32 lines
755 B
YAML
32 lines
755 B
YAML
version: '3.8'
|
|
services:
|
|
monitor-ai:
|
|
build: .
|
|
container_name: monitor-ai
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "fetch('http://localhost:3000/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 40s
|
|
ports:
|
|
- "6181:3000"
|
|
volumes:
|
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
|
- ./data:/app/data
|
|
- ./.next:/app/.next
|
|
env_file: .env
|
|
environment:
|
|
- NODE_ENV=production
|
|
- DATABASE_PATH=/app/data/monitor.db
|
|
- MONITOR_MODE=local
|
|
- NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
networks:
|
|
- webnet
|
|
init: true
|
|
|
|
networks:
|
|
webnet:
|
|
external: true
|