Skip to content

The IDE you know, rebuilt in Rust. IntelliJ IDEA–style keymap, tool windows and search-everywhere in a fast native app: editor, code insight, debugger, Git, terminal, database and HTTP clients for 60+ languages.

479 B
Raw Blame
#!/usr/bin/env bash
# Deploys the API container. Usage: scripts/deploy.sh <environment>
set -euo pipefail

env="${1:-staging}"
tag="$(git rev-parse --short HEAD 2>/dev/null || echo dev)"

echo "Building acme-api:${tag} for ${env}"
docker build -t "acme-api:${tag}" .

# TODO: push to the registry and roll out
if [[ "$env" == "production" ]]; then
  read -r -p "Deploy to production? [y/N] " answer
  [[ "$answer" == "y" ]] || exit 1
fi
echo "Deployed acme-api:${tag} to ${env}"