feat: add production docker compose deployment#138
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a production deployment setup using Docker Compose (plus VPS-side deployment script and host Nginx reverse-proxy config), and updates the NestJS backend to support graceful shutdown in containers.
Changes:
- Add
docker-compose.prod.ymlfor production orchestration (backend/frontend/postgres/redis) with healthchecks and safe port bindings. - Add
.env.production.exampleplus.gitignoreentry to keep real production env out of git. - Add VPS deployment script and host Nginx config; enable Nest shutdown hooks for graceful container shutdown.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| infra/scripts/deploy.sh | VPS deploy script that pulls and restarts backend/frontend with the prod compose file. |
| infra/nginx/station.drdnt.org.conf | Host Nginx reverse-proxy routing /api/ to backend and all other paths to frontend. |
| docker-compose.prod.yml | Production Compose stack with healthchecks, depends_on health conditions, and localhost-only port bindings. |
| backend/src/main.ts | Enables NestJS shutdown hooks for graceful SIGTERM handling in containers. |
| .gitignore | Ignores .env.production so secrets aren’t committed. |
| .env.production.example | Template for required production environment variables. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
acb0b46 to
d162a25
Compare
d162a25 to
874f4fc
Compare
1de5559 to
9a2da6e
Compare
874f4fc to
8bb50d4
Compare
- add docker-compose.prod.yml and a production env template - add deploy and nginx config under infra for VPS rollout - enable Nest shutdown hooks for graceful container shutdown
- extend infra tests for deploy.sh and the production station nginx config - keep the stacked issue #108 branch validated through pnpm --filter infra test
- quote the production cleanup cron expression in the env template
b655ff5 to
44ffddb
Compare
9a2da6e to
4959b98
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Testing
Depends on #107
Closes #108