geocrop-platform./apps/nextgen/docker-compose.yml

27 lines
821 B
YAML

services:
app:
build: .
image: nextgen-school:latest
ports:
- "3001:3001"
environment:
NODE_ENV: production
PORT: 3001
DB_PATH: /app/data/school.db
JWT_SECRET: ${JWT_SECRET:-CHANGE-ME-generate-a-64-byte-hex-secret}
ALLOWED_ORIGINS: ${ALLOWED_ORIGINS:-http://localhost:3001}
ALLOW_CLIENT_OFFLINE_MINT: ${ALLOW_CLIENT_OFFLINE_MINT:-false}
env_file:
- path: .env
required: false
volumes:
- ./data:/app/data
- ./uploads:/app/server/uploads
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3001/api/health',r=>{process.exit(r.statusCode===200?0:1)}).on('error',()=>process.exit(1))"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s