services: mysql: image: mysql:8.0 container_name: flux-panel-mysql restart: always environment: MYSQL_ROOT_PASSWORD: ${DB_PASSWORD:-password} MYSQL_DATABASE: ${DB_NAME:-flux_panel} MYSQL_USER: ${DB_USER:-flux} MYSQL_PASSWORD: ${DB_PASSWORD:-password} TZ: Asia/Shanghai volumes: - mysql_data:/var/lib/mysql - ./gost.sql:/docker-entrypoint-initdb.d/init.sql:ro command: > --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max_connections=1000 --innodb_buffer_pool_size=256M networks: - flux-panel-network healthcheck: test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${DB_PASSWORD:-password}"] interval: 10s timeout: 5s retries: 10 start_period: 30s backend: image: ghcr.io/missuo/flux-panel-backend:latest container_name: flux-panel-backend restart: always environment: DB_HOST: mysql DB_PORT: 3306 DB_NAME: ${DB_NAME:-flux_panel} DB_USER: ${DB_USER:-flux} DB_PASSWORD: ${DB_PASSWORD:-password} JWT_SECRET: ${JWT_SECRET:-change-this-secret-in-production} LOG_DIR: /app/logs ports: - "${BACKEND_PORT:-6365}:6365" volumes: - backend_logs:/app/logs depends_on: mysql: condition: service_healthy networks: - flux-panel-network frontend: image: ghcr.io/missuo/flux-panel-frontend:latest container_name: flux-panel-frontend restart: always ports: - "${FRONTEND_PORT:-80}:80" depends_on: - backend networks: - flux-panel-network volumes: mysql_data: driver: local backend_logs: driver: local networks: flux-panel-network: driver: bridge ipam: config: - subnet: 172.33.0.0/16