mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-09-28 07:36:38 +08:00
0191f29cf1
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
91 lines
2.1 KiB
YAML
91 lines
2.1 KiB
YAML
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"
|
|
max-file: "3"
|
|
environment:
|
|
DB_TYPE: ${DB_TYPE:-sqlite}
|
|
DB_PATH: /app/data/gost.db
|
|
DATABASE_URL: ${DATABASE_URL:-}
|
|
JWT_SECRET: ${JWT_SECRET}
|
|
SERVER_ADDR: :6365
|
|
TZ: Asia/Shanghai
|
|
ports:
|
|
- "${BACKEND_PORT}:6365"
|
|
volumes:
|
|
- 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"
|
|
max-file: "3"
|
|
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
|
|
|
|
|
|
networks:
|
|
gost-network:
|
|
name: gost-network
|
|
driver: bridge
|
|
ipam:
|
|
config:
|
|
- subnet: 172.80.0.0/16
|