feat: add production docker compose deployment#136
Closed
GitAddRemote wants to merge 1 commit into
Closed
Conversation
- 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
Contributor
There was a problem hiding this comment.
Pull request overview
Adds production deployment assets (Docker Compose + infra configs) to support VPS deployment of the Station stack, and updates the backend bootstrap to shut down gracefully in containers.
Changes:
- Add
docker-compose.prod.ymlto run backend/frontend/postgres/redis with healthchecks and localhost-only port bindings. - Add production environment template and ignore the real
.env.productionin git. - Add VPS deploy script and Nginx vhost config; enable Nest shutdown hooks.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| infra/scripts/deploy.sh | Pulls images and restarts backend/frontend using the production Compose file and env-file. |
| infra/nginx/station.drdnt.org.conf | Nginx reverse proxy config routing /api/ to backend and / to frontend. |
| docker-compose.prod.yml | Production Compose stack definition with health checks, redis/postgres persistence, and graceful-stop settings. |
| backend/src/main.ts | Enables Nest shutdown hooks for SIGTERM/SIGINT handling in containers. |
| .gitignore | Adds .env.production to ignored files. |
| .env.production.example | Documents the expected production environment variables for Compose/backend. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
| } | ||
|
|
Comment on lines
+61
to
+65
| command: sh -c 'redis-server --requirepass "$$REDIS_PASSWORD" --appendonly yes' | ||
| volumes: | ||
| - redis_data:/data | ||
| healthcheck: | ||
| test: ['CMD-SHELL', 'redis-cli -a "$$REDIS_PASSWORD" ping'] |
| @@ -17,6 +17,7 @@ import { HttpExceptionFilter } from './common/filters/http-exception.filter'; | |||
|
|
|||
| async function bootstrap() { | |||
| const app = await NestFactory.create(AppModule); | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded by PR #138, which uses the required branch naming convention (
feature/ISSUE-136).Replacement PR: #138