Skip to content

Commit 5748dcf

Browse files
lmcdonoughclaude
andcommitted
Remove volumes on docker compose down to prevent stale credentials
Added -v flag to 'docker compose down' to remove volumes when tearing down PR preview environments. This ensures PostgreSQL doesn't reuse old volumes with stale credentials that no longer match updated secrets. Without this flag, the pr-201_postgres_data volume persists between deployments, causing authentication failures when secrets are rotated. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 35e06f9 commit 5748dcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/deploy-pr-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ jobs:
401401
docker pull ${BACKEND_IMAGE}
402402
403403
echo "🛑 Stopping existing PR-${PR_NUMBER} environment..."
404-
docker compose -p ${PROJECT_NAME} -f pr-${PR_NUMBER}-compose.yaml down 2>/dev/null || true
404+
docker compose -p ${PROJECT_NAME} -f pr-${PR_NUMBER}-compose.yaml down -v 2>/dev/null || true
405405
406406
echo "🚀 Starting PR preview environment..."
407407
# Use --env-file to pass environment variables to Docker Compose

0 commit comments

Comments
 (0)