Files
aiform_prod/docker-compose.prod.yml
2026-02-20 09:31:13 +03:00

63 lines
1.6 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '3.8'
# ============================================
# PRODUCTION ENVIRONMENT
# Запуск: docker-compose -f docker-compose.prod.yml up -d
# ============================================
services:
ticket_form_frontend_prod:
container_name: miniapp_front
build:
context: ./frontend
dockerfile: Dockerfile.prod
ports:
- "4176:3000"
environment:
- VITE_API_URL=https://aiform.clientright.ru
- NODE_ENV=production
networks:
- ticket-form-prod-network
restart: unless-stopped
labels:
- "environment=production"
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
ticket_form_backend_prod:
container_name: miniapp_back
build:
context: ./backend
dockerfile: Dockerfile
network_mode: host # Для доступа к localhost MySQL/Redis
env_file:
- .env
environment:
- APP_ENV=production
- DEBUG=false
- LOG_LEVEL=INFO
volumes:
- ./backend/logs:/app/logs
restart: unless-stopped
labels:
- "environment=production"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:4200/health"]
interval: 30s
timeout: 10s
retries: 3
# В проде используем внешние БД (не создаём локальные)
# PostgreSQL: 147.45.189.234:5432
# Redis: localhost:6379 (системный)
# MySQL: localhost:3306 (системный)
networks:
ticket-form-prod-network:
driver: bridge
name: ticket-form-prod-network