version: "3.8" services: airouter: build: context: . dockerfile: Dockerfile container_name: airouter restart: unless-stopped ports: - "${PORT:-3000}:3000" environment: # Required: Set a strong secret for JWT token signing - JWT_SECRET=${JWT_SECRET:-airouter-docker-secret-change-in-production} # Production mode for secure cookies - NODE_ENV=production # Data directory inside container (mounted as volume) - DATA_DIR=/app/data # Hostname binding - HOSTNAME=0.0.0.0 volumes: # Persistent storage for LowDB database - airouter-data:/app/data healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s # Resource limits (optional, adjust as needed) deploy: resources: limits: memory: 512M reservations: memory: 256M volumes: airouter-data: driver: local