feat: add Docker support with multi-stage build and compose profiles
Multi-stage Dockerfile (base/dev/prod) using uv for fast installs. Dev stage supports hot-reload via bind-mounted source; prod stage builds an optimised image with 4 uvicorn workers. docker-compose.yml provides 'dev' and 'prod' profiles with named volumes for data.
This commit is contained in:
parent
c381896de4
commit
020e6c6fa0
3 changed files with 98 additions and 0 deletions
34
docker-compose.yml
Normal file
34
docker-compose.yml
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
services:
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
target: prod
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
OIDC_OP_ISSUER: "http://localhost:8000"
|
||||
OIDC_OP_SESSION_SECRET: "change-me-in-production"
|
||||
volumes:
|
||||
- app-data:/app/data
|
||||
profiles:
|
||||
- prod
|
||||
|
||||
app-dev:
|
||||
build:
|
||||
context: .
|
||||
target: dev
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
OIDC_OP_ISSUER: "http://localhost:8000"
|
||||
OIDC_OP_DEBUG: "true"
|
||||
volumes:
|
||||
- ./src:/app/src
|
||||
- ./pyproject.toml:/app/pyproject.toml
|
||||
- dev-data:/app/data
|
||||
profiles:
|
||||
- dev
|
||||
|
||||
volumes:
|
||||
app-data:
|
||||
dev-data:
|
||||
Loading…
Add table
Add a link
Reference in a new issue