Prepare hosting deployment and Drone image builds
Some checks failed
continuous-integration/drone/push Build was killed
continuous-integration/drone/pr Build was killed

This commit is contained in:
2026-03-18 15:26:18 +06:00
parent de8ad67038
commit 05b8efd0f2
13 changed files with 195 additions and 206 deletions

View File

@@ -0,0 +1,9 @@
# Image tag produced by Drone (latest or build number)
IMAGE_TAG=latest
# Optional explicit image names
# BACKEND_IMAGE=registry.nevetime.ru/mc-panel-backend:latest
# FRONTEND_IMAGE=registry.nevetime.ru/mc-panel-frontend:latest
# External port for the frontend container
FRONTEND_PORT=80

View File

@@ -0,0 +1,56 @@
version: '3.8'
services:
backend:
image: ${BACKEND_IMAGE:-registry.nevetime.ru/mc-panel-backend:${IMAGE_TAG:-latest}}
container_name: mc-panel-backend
restart: unless-stopped
env_file:
- ../backend/.env
environment:
PORT: 8000
WORKERS: 2
PYTHONPATH: /app
DEBUG: 'false'
volumes:
- mc_servers:/app/servers
- mc_data:/app/data
- mc_logs:/app/logs
networks:
- mc-panel-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
frontend:
image: ${FRONTEND_IMAGE:-registry.nevetime.ru/mc-panel-frontend:${IMAGE_TAG:-latest}}
container_name: mc-panel-frontend
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-80}:80"
depends_on:
backend:
condition: service_healthy
networks:
- mc-panel-network
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
mc_servers:
driver: local
mc_data:
driver: local
mc_logs:
driver: local
networks:
mc-panel-network:
driver: bridge