最後活躍 1 month ago

修訂 ac552e890e62361d53313ad122ad3769491fb9a1

docker-compose-MynetworK.yaml 原始檔案
1services:
2 mynetwork:
3 image: ghcr.io/erreur32/mynetwork:latest
4 container_name: mynetwork
5 restart: unless-stopped
6
7 # Port mapping: host:container
8 ports:
9 - "${DASHBOARD_PORT:-7505}:3000"
10
11 # Environment configuration
12 environment:
13 - NODE_ENV=production
14 - PORT=3000
15 - FREEBOX_HOST=${FREEBOX_HOST:-mafreebox.freebox.fr}
16 - FREEBOX_TOKEN_FILE=/app/data/freebox_token.json
17 - JWT_SECRET=${JWT_SECRET:-change_me_in_production}
18 # Optional: External config file path
19 - CONFIG_FILE_PATH=${CONFIG_FILE_PATH:-/app/config/mynetwork.conf}
20
21 # Persistent storage for Freebox API token, database, and config
22 volumes:
23 - mynetwork_data:/app/data
24 # Optional: Mount external configuration file
25 # Uncomment the line below to use an external config file
26 # - ./config/mynetwork.conf:/app/config/mynetwork.conf:ro
27
28 # Network mode options:
29 # Option 1: Bridge mode (default) - uses port mapping
30 # Option 2: Host mode - direct network access (uncomment below)
31 # network_mode: host
32
33 # Health check
34 healthcheck:
35 test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://127.0.0.1:3000/api/health"]
36 interval: 30s
37 timeout: 10s
38 retries: 3
39 start_period: 40s
40
41 # Resource limits (optional)
42 # deploy:
43 # resources:
44 # limits:
45 # cpus: '0.5'
46 # memory: 512M
47 # reservations:
48 # cpus: '0.1'
49 # memory: 256M
50
51# Named volume for persistent token storage, database, and config
52volumes:
53 mynetwork_data:
54 name: mynetwork_data