fix(deploy): rebuild web image during releases
CI/CD Pipeline / Validate Code Quality And Tests (push) Failing after 15s
Deploy / Deploy Staging (push) Failing after 53s
Deploy / Deploy Production (push) Has been skipped

This commit is contained in:
Xiaoxia AI
2026-06-21 16:49:00 +08:00
parent 70e58ccf8e
commit c5042f8a51
3 changed files with 10 additions and 0 deletions
+1
View File
@@ -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 &&
+1
View File
@@ -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
+8
View File
@@ -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")