fix(deploy): rebuild web image during releases
This commit is contained in:
@@ -41,6 +41,7 @@ export COMPOSE_PROJECT_NAME=xiaoxia-production-app
|
||||
|
||||
docker compose --env-file "$ENV_FILE" build --pull=false api
|
||||
docker compose --env-file "$ENV_FILE" build --pull=false worker
|
||||
docker compose --env-file "$ENV_FILE" build --pull=false web
|
||||
docker compose --env-file "$ENV_FILE" run --rm --no-deps api sh -c '
|
||||
cd /app &&
|
||||
python /app/scripts/validate_release_env.py --from-environ --strict-external &&
|
||||
|
||||
@@ -36,6 +36,7 @@ export COMPOSE_DOCKER_CLI_BUILD=0
|
||||
|
||||
docker compose build --pull=false api
|
||||
docker compose build --pull=false worker
|
||||
docker compose build --pull=false web
|
||||
docker compose run --rm --no-deps api sh -c '
|
||||
cd /app
|
||||
set +e
|
||||
|
||||
@@ -57,6 +57,14 @@ def test_init_production_env_is_non_deploying_and_separated():
|
||||
assert "docker run" not in script
|
||||
|
||||
|
||||
def test_deploy_scripts_build_web_image_explicitly():
|
||||
staging_script = Path("infra/docker/deploy-staging.sh").read_text(encoding="utf-8")
|
||||
production_script = Path("infra/docker/deploy-production.sh").read_text(encoding="utf-8")
|
||||
|
||||
assert "docker compose build --pull=false web" in staging_script
|
||||
assert "docker compose --env-file \"$ENV_FILE\" build --pull=false web" in production_script
|
||||
|
||||
|
||||
def test_backup_postgres_writes_manifest_and_version():
|
||||
script = Path("scripts/backup_postgres.sh").read_text(encoding="utf-8")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user