Files

38 lines
905 B
YAML
Raw Permalink Normal View History

services:
backend:
build:
context: .
dockerfile: Dockerfile
image: child-gold-land-backend:latest
container_name: child-gold-land-backend
ports:
- "${PORT:-3000}:3000"
env_file:
- .env.docker
environment:
NODE_ENV: production
PORT: 3000
HOST: 0.0.0.0
DB_PATH: /app/data/app.db
volumes:
# Persistent SQLite storage (WAL/SHM live here too).
# On server, replace with e.g. /var/lib/child-gold-land/data:/app/data
- sqlite_data:/app/data
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3000/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
sqlite_data:
name: child-gold-land-sqlite