Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> git-subtree-dir: maquina-comercial-pessoal git-subtree-mainline:f5af038e19git-subtree-split:a9ef4d776d
41 lines
935 B
YAML
41 lines
935 B
YAML
services:
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env.production
|
|
environment:
|
|
- APP_HOST=0.0.0.0
|
|
- APP_PORT=3910
|
|
- APP_DB_PATH=/app/data/maquina-pessoal.db
|
|
- APP_WHATSAPP_AUTH_DIR=/app/data/runtime/whatsapp-auth
|
|
- CNPJ_BASE_DIR=/app/prospeccao/cnpj
|
|
volumes:
|
|
- ./data:/app/data
|
|
expose:
|
|
- "3910"
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3910/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 30s
|
|
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
restart: unless-stopped
|
|
depends_on:
|
|
app:
|
|
condition: service_healthy
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./Caddyfile:/etc/caddy/Caddyfile:ro
|
|
- caddy_data:/data
|
|
- caddy_config:/config
|
|
|
|
volumes:
|
|
caddy_data:
|
|
caddy_config:
|