chore: improve Dockerfile and compose — dep caching, TLS libs, healthchecks, worker, liquid templates
This commit is contained in:
24
compose.yml
24
compose.yml
@@ -5,10 +5,30 @@ services:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
DATABASE_URL: sqlite:///data/app.db
|
||||
JWT_SECRET: change-me-in-production
|
||||
RUST_LOG: info
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user