Some checks failed
continuous-integration/drone/push Build encountered an error
62 lines
1.3 KiB
YAML
62 lines
1.3 KiB
YAML
version: '3.8'
|
|
|
|
services:
|
|
mc-panel:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
target: production
|
|
container_name: mc-panel
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
- PORT=8000
|
|
- WORKERS=1
|
|
- PYTHONPATH=/app
|
|
volumes:
|
|
# Персистентные данные
|
|
- mc_servers:/app/backend/servers
|
|
- mc_data:/app/backend/data
|
|
- mc_logs:/app/logs
|
|
# Конфигурационные файлы (опционально)
|
|
- ./backend/.env:/app/backend/.env:ro
|
|
- ./daemon/.env:/app/daemon/.env:ro
|
|
networks:
|
|
- mc-panel-network
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
|
interval: 30
|
|
timeout: 10
|
|
retries: 3
|
|
start_period: 60
|
|
|
|
# Nginx reverse proxy (опционально)
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: mc-panel-nginx
|
|
restart: unless-stopped
|
|
ports:
|
|
- "80:80"
|
|
- "443:443"
|
|
volumes:
|
|
- ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
- ./nginx/ssl:/etc/nginx/ssl:ro
|
|
depends_on:
|
|
- mc-panel
|
|
networks:
|
|
- mc-panel-network
|
|
profiles:
|
|
- nginx
|
|
|
|
volumes:
|
|
mc_servers:
|
|
driver: local
|
|
mc_data:
|
|
driver: local
|
|
mc_logs:
|
|
driver: local
|
|
|
|
networks:
|
|
mc-panel-network:
|
|
driver: bridge |