Skip to content

Commit db2fd3d

Browse files
baijumclaude
andcommitted
fix: set docker compose project name for predictable container names
Without -p, Docker Compose uses the directory name (deploy/) as the project name, creating containers like deploy-app-1 instead of hello-world-app-1. The generated Caddyfile expects <app-name>-app-1. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9441709 commit db2fd3d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ jobs:
4444
|| docker compose -f /opt/platform/docker-compose.yml exec -T postgres \
4545
psql -U postgres -c "CREATE DATABASE ${APP_DB}"
4646
47-
# Build and start app containers
48-
docker compose -f deploy/docker-compose.yml up -d --build
47+
# Build and start app containers (project name = app name for predictable container names)
48+
docker compose -p ${APP_NAME} -f deploy/docker-compose.yml up -d --build
4949
5050
# Run database migrations
51-
docker compose -f deploy/docker-compose.yml exec -T app alembic -c app/alembic.ini upgrade head
51+
docker compose -p ${APP_NAME} -f deploy/docker-compose.yml exec -T app alembic -c app/alembic.ini upgrade head
5252
5353
# Health check
5454
bash scripts/health-check.sh https://${{ secrets.APP_DOMAIN }}/health

0 commit comments

Comments
 (0)