24 lines
702 B
Bash
Executable File
24 lines
702 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
: "${RELEASE_TAG:?Set RELEASE_TAG to an immutable image tag}"
|
|
|
|
production_env_file=${PRODUCTION_ENV_FILE:-.env}
|
|
if [ ! -f "$production_env_file" ]; then
|
|
printf '%s\n' "Production environment file not found: $production_env_file" >&2
|
|
exit 1
|
|
fi
|
|
set -a
|
|
. "$production_env_file"
|
|
set +a
|
|
./scripts/validate-production-env.sh
|
|
|
|
compose_args='-f compose.production.yaml'
|
|
export IMAGE_TAG="$RELEASE_TAG"
|
|
|
|
docker compose $compose_args build api worker web
|
|
docker compose $compose_args up -d --wait postgres redis
|
|
docker compose $compose_args run --rm api npm run db:migrate
|
|
docker compose $compose_args up -d --wait api worker web
|
|
docker compose $compose_args ps
|
|
./scripts/smoke-production.sh |