services: backend: image: ghcr.io/sagit-chu/flux-panel-backend:${FLUX_VERSION:-latest} container_name: flux-panel-backend restart: unless-stopped logging: driver: json-file options: max-size: "20m" environment: DB_TYPE: ${DB_TYPE:-sqlite} DB_PATH: /app/data/gost.db DATABASE_URL: ${DATABASE_URL:-} JWT_SECRET: ${JWT_SECRET} LOG_DIR: /app/logs SERVER_ADDR: :6365 TZ: Asia/Shanghai ports: - "${BACKEND_PORT}:6365" volumes: - backend_logs:/app/logs - sqlite_data:/app/data networks: - gost-network stop_grace_period: 30s stop_signal: SIGTERM healthcheck: test: ["CMD", "sh", "-c", "wget --no-verbose --tries=1 --spider http://localhost:6365/flow/test || exit 1"] interval: 30s timeout: 10s retries: 5 start_period: 30s postgres: image: postgres:16-alpine container_name: flux-panel-postgres restart: unless-stopped logging: driver: json-file options: max-size: "20m" environment: POSTGRES_DB: ${POSTGRES_DB:-flux_panel} POSTGRES_USER: ${POSTGRES_USER:-flux_panel} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-flux_panel_change_me} TZ: Asia/Shanghai volumes: - postgres_data:/var/lib/postgresql/data networks: - gost-network healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-flux_panel} -d ${POSTGRES_DB:-flux_panel}"] interval: 10s timeout: 5s retries: 10 start_period: 20s frontend: image: ghcr.io/sagit-chu/vite-frontend:${FLUX_VERSION:-latest} container_name: vite-frontend restart: unless-stopped logging: driver: json-file options: max-size: "20m" ports: - "${FRONTEND_PORT}:80" depends_on: backend: condition: service_healthy networks: - gost-network volumes: sqlite_data: name: sqlite_data driver: local postgres_data: name: postgres_data driver: local backend_logs: name: backend_logs driver: local networks: gost-network: name: gost-network driver: bridge ipam: config: - subnet: 172.20.0.0/16