35 lines
728 B
YAML
35 lines
728 B
YAML
services:
|
|
app:
|
|
build: .
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
DATABASE_URL: sqlite:///data/app.db
|
|
JWT_SECRET: change-me-in-production-min-32-chars
|
|
HOST: 0.0.0.0
|
|
PORT: "3000"
|
|
RUST_LOG: bootstrap=info,tower_http=info
|
|
volumes:
|
|
- db_data:/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/health || exit 1"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
|
|
worker:
|
|
build: .
|
|
entrypoint: ["./worker"]
|
|
environment:
|
|
DATABASE_URL: sqlite:///data/app.db
|
|
RUST_LOG: worker=info
|
|
volumes:
|
|
- db_data:/data
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
|
|
volumes:
|
|
db_data:
|