feat: add production docker packaging
Quality / test (push) Canceled after 0s

This commit is contained in:
2026-09-09 15:17:44 -04:00
parent 0e4830ace9
commit f1fd007894
6 changed files with 158 additions and 0 deletions
+24
View File
@@ -21,6 +21,30 @@ Persistent data:
- Redis data where needed
- image storage
## Production Compose
The repository includes `compose.production.yaml` with separate API, worker,
web, PostgreSQL, and Redis services. It exposes only the Nginx web service and
keeps database and Redis ports internal to the Compose network.
Before starting, create a production `.env` containing real values for
`POSTGRES_DB`, `POSTGRES_USER`, `POSTGRES_PASSWORD`, `DATABASE_URL`,
`REDIS_URL`, `SMTP_URL`, `SMTP_FROM`, and a stable base64-encoded 32-byte
`MFA_ENCRYPTION_KEY`. Do not use the fixture pricing provider in production.
Start the stack and apply migrations with:
```sh
docker compose -f compose.production.yaml up -d --build postgres redis
docker compose -f compose.production.yaml run --rm api npm run db:migrate
docker compose -f compose.production.yaml up -d --build api worker web
```
The default web port is `8080` and can be changed with `WEB_PORT`. The API and
worker images share the same Node workspace image; the web image builds the Vue
application and serves it through Nginx with SPA fallback and internal `/api`
proxying.
## Reverse proxy
Responsible for: