services: mynetwork: image: ghcr.io/erreur32/mynetwork:latest container_name: mynetwork restart: unless-stopped # Port mapping: host:container ports: - "${DASHBOARD_PORT:-7505}:3000" # Environment configuration environment: - NODE_ENV=production - PORT=3000 - FREEBOX_HOST=${FREEBOX_HOST:-mafreebox.freebox.fr} - FREEBOX_TOKEN_FILE=/app/data/freebox_token.json - JWT_SECRET=${JWT_SECRET:-change_me_in_production} # Optional: External config file path - CONFIG_FILE_PATH=${CONFIG_FILE_PATH:-/app/config/mynetwork.conf} # Persistent storage for Freebox API token, database, and config volumes: - mynetwork_data:/app/data # Optional: Mount external configuration file # Uncomment the line below to use an external config file # - ./config/mynetwork.conf:/app/config/mynetwork.conf:ro # Network mode options: # Option 1: Bridge mode (default) - uses port mapping # Option 2: Host mode - direct network access (uncomment below) # network_mode: host # Health check healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s # Resource limits (optional) # deploy: # resources: # limits: # cpus: '0.5' # memory: 512M # reservations: # cpus: '0.1' # memory: 256M # Named volume for persistent token storage, database, and config volumes: mynetwork_data: name: mynetwork_data