- Remove trailing whitespace from expose port configuration - Consolidate environment variable declarations by removing extra blank lines - Improve readability by standardizing spacing between configuration sections - Maintain functional equivalence while improving code consistency
69 lines
1.7 KiB
YAML
69 lines
1.7 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
mc-panel:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: mc-panel
|
|
restart: unless-stopped
|
|
expose:
|
|
- "8000"
|
|
environment:
|
|
- ZITADEL_ISSUER=${ZITADEL_ISSUER}
|
|
- ZITADEL_CLIENT_ID=${ZITADEL_CLIENT_ID}
|
|
- ZITADEL_CLIENT_SECRET=${ZITADEL_CLIENT_SECRET}
|
|
- BASE_URL=${BASE_URL:-http://localhost}
|
|
- FRONTEND_URL=${FRONTEND_URL:-http://localhost}
|
|
- SECRET_KEY=${SECRET_KEY:-change-this-in-production}
|
|
- PYTHONUNBUFFERED=1
|
|
volumes:
|
|
- ./data/servers:/app/backend/servers
|
|
- ./data/users.json:/app/backend/users.json
|
|
- ./data/tickets.json:/app/backend/tickets.json
|
|
- ./data:/app/data
|
|
networks:
|
|
- mc-panel-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/auth/oidc/providers"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: mc-panel-nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/default.conf:/etc/nginx/nginx.conf:ro
|
|
- frontend-static:/usr/share/nginx/html:ro
|
|
- ./nginx/ssl:/etc/nginx/ssl:ro
|
|
depends_on:
|
|
- frontend-init
|
|
- mc-panel
|
|
networks:
|
|
- mc-panel-network
|
|
|
|
frontend-init:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: mc-panel-frontend-init
|
|
volumes:
|
|
- frontend-static:/tmp/frontend
|
|
command: sh -c "cp -r /app/frontend/dist/* /tmp/frontend/ 2>/dev/null || echo 'No files to copy'; echo 'Frontend initialization complete'"
|
|
restart: "no"
|
|
networks:
|
|
- mc-panel-network
|
|
|
|
networks:
|
|
mc-panel-network:
|
|
driver: bridge
|
|
|
|
volumes:
|
|
frontend-static:
|
|
driver: local |