Skip to content

feat: add production docker compose deployment#136

Closed
GitAddRemote wants to merge 1 commit into
tech-issue-102-docker-hardeningfrom
tech-issue-108-compose-prod
Closed

feat: add production docker compose deployment#136
GitAddRemote wants to merge 1 commit into
tech-issue-102-docker-hardeningfrom
tech-issue-108-compose-prod

Conversation

@GitAddRemote
Copy link
Copy Markdown
Owner

@GitAddRemote GitAddRemote commented Apr 24, 2026

Superseded by PR #138, which uses the required branch naming convention (feature/ISSUE-136).

Replacement PR: #138

- 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
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yml to run backend/frontend/postgres/redis with healthchecks and localhost-only port bindings.
  • Add production environment template and ignore the real .env.production in 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 thread docker-compose.prod.yml
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']
Comment thread backend/src/main.ts
@@ -17,6 +17,7 @@ import { HttpExceptionFilter } from './common/filters/http-exception.filter';

async function bootstrap() {
const app = await NestFactory.create(AppModule);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants