This commit is contained in:
@@ -1,53 +1,50 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
mc-panel:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: production
|
||||
container_name: mc-panel
|
||||
# Backend сервис
|
||||
backend:
|
||||
image: registry.nevetime.ru/mc-panel-backend:${IMAGE_TAG:-latest}
|
||||
container_name: mc-panel-backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
- PORT=8000
|
||||
- WORKERS=1
|
||||
- WORKERS=2
|
||||
- PYTHONPATH=/app
|
||||
- DEBUG=false
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
volumes:
|
||||
# Персистентные данные
|
||||
- mc_servers:/app/backend/servers
|
||||
- mc_data:/app/backend/data
|
||||
- mc_servers:/app/servers
|
||||
- mc_data:/app/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
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 60
|
||||
start_period: 60s
|
||||
|
||||
# Nginx reverse proxy (опционально)
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
container_name: mc-panel-nginx
|
||||
# Frontend сервис
|
||||
frontend:
|
||||
image: registry.nevetime.ru/mc-panel-frontend:${IMAGE_TAG:-latest}
|
||||
container_name: mc-panel-frontend
|
||||
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
|
||||
- backend
|
||||
networks:
|
||||
- mc-panel-network
|
||||
profiles:
|
||||
- nginx
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost/health"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
mc_servers:
|
||||
|
||||
Reference in New Issue
Block a user