chore: improve Dockerfile and compose — dep caching, TLS libs, healthchecks, worker, liquid templates

This commit is contained in:
2026-05-18 00:56:25 +02:00
parent 6183262ed5
commit 6dc9b26dfc
5 changed files with 185 additions and 9 deletions

View File

@@ -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: