Parameterize docker-compose for server deployment
All checks were successful
CI / test (push) Successful in 20s

Compose settings:

- Reworked docker-compose.yml to use environment-variable driven configuration.

- Added shared app env anchors for backend and worker to reduce duplication.

- Made ports, credentials, security limits, SMTP, and storage options configurable.

Production profile:

- Added docker-compose.prod.yml override to close internal service ports.

- Keeps external attack surface minimal for Linux server deployments.

Docs and ops:

- Added .env.docker.example with full variable set for server setup.

- Updated README with quick-start and production launch commands.
This commit is contained in:
2026-03-07 21:58:21 +03:00
parent 2501466c7a
commit 683c8a49e2
4 changed files with 136 additions and 71 deletions

View File

@@ -35,9 +35,17 @@ celery -A app.celery_app:celery_app worker --loglevel=info
Run full stack (web + api + worker + postgres + redis + minio + mailpit):
1. docker compose up --build
1. cp .env.docker.example .env
2. edit `.env` (`SECRET_KEY`, passwords, domain)
3. docker compose up -d --build
2. Open:
- Web: http://localhost
- API docs: http://localhost:8000/docs
- Mailpit UI: http://localhost:8025
- MinIO console: http://localhost:9001
### Production Mode
Use production override to close internal ports (postgres/redis/minio/mailpit/backend):
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d --build