version: '3.8' # Local build version: build the Docker image from source code # Usage: docker compose -f docker-compose.build.yml up -d services: frpc-hub: build: context: .. dockerfile: Dockerfile args: VERSION: ${VERSION:-latest} BUILD_TIME: ${BUILD_TIME:-$(date -u '+%Y-%m-%d_%H:%M:%S')} image: frpc-hub:${VERSION:-latest} container_name: frpc-hub restart: unless-stopped ports: # Web UI and API - "8090:8090" # Add your frpc proxy ports here # Example: # - "7000:7000" # frps server port # - "7500:7500" # frps dashboard port volumes: # Persistent data storage - frpc-hub-data:/app/pb_data # Optional: Mount custom frpc configurations # - ./frpc-configs:/app/frpc-configs environment: # Timezone - TZ=Asia/Shanghai # Optional: Custom PocketBase settings # - PB_ENCRYPTION_KEY=your-encryption-key # Resource limits (optional) deploy: resources: limits: cpus: '2' memory: 1G reservations: cpus: '0.5' memory: 256M # Network mode (optional) # Uncomment if you need host network for better frpc performance # network_mode: host # Logging logging: driver: "json-file" options: max-size: "10m" max-file: "3" healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:8090/api/health"] interval: 30s timeout: 3s start_period: 10s retries: 3 volumes: frpc-hub-data: driver: local networks: default: name: frpc-hub-network