docker-compose-MynetworK.yaml
· 1.6 KiB · YAML
Surowy
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
| 1 | services: |
| 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 |
| 52 | volumes: |
| 53 | mynetwork_data: |
| 54 | name: mynetwork_data |