2025-12-14 02:38:35 +07:00
|
|
|
services:
|
|
|
|
|
db:
|
|
|
|
|
image: postgres:15-alpine
|
|
|
|
|
container_name: marathon-db
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: marathon
|
|
|
|
|
POSTGRES_PASSWORD: ${DB_PASSWORD:-marathon}
|
|
|
|
|
POSTGRES_DB: marathon
|
|
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U marathon"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
backend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./backend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
container_name: marathon-backend
|
|
|
|
|
environment:
|
|
|
|
|
DATABASE_URL: postgresql+asyncpg://marathon:${DB_PASSWORD:-marathon}@db:5432/marathon
|
|
|
|
|
SECRET_KEY: ${SECRET_KEY:-change-me-in-production}
|
|
|
|
|
OPENAI_API_KEY: ${OPENAI_API_KEY}
|
|
|
|
|
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
|
|
|
|
|
DEBUG: ${DEBUG:-false}
|
2025-12-16 01:25:21 +07:00
|
|
|
# S3 Storage
|
|
|
|
|
S3_ENABLED: ${S3_ENABLED:-false}
|
|
|
|
|
S3_BUCKET_NAME: ${S3_BUCKET_NAME:-}
|
|
|
|
|
S3_REGION: ${S3_REGION:-ru-1}
|
|
|
|
|
S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY_ID:-}
|
|
|
|
|
S3_SECRET_ACCESS_KEY: ${S3_SECRET_ACCESS_KEY:-}
|
|
|
|
|
S3_ENDPOINT_URL: ${S3_ENDPOINT_URL:-}
|
|
|
|
|
S3_PUBLIC_URL: ${S3_PUBLIC_URL:-}
|
2025-12-14 02:38:35 +07:00
|
|
|
volumes:
|
|
|
|
|
- ./backend/uploads:/app/uploads
|
|
|
|
|
- ./backend/app:/app/app
|
|
|
|
|
ports:
|
|
|
|
|
- "8000:8000"
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./frontend
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
args:
|
|
|
|
|
VITE_API_URL: ${VITE_API_URL:-/api/v1}
|
|
|
|
|
container_name: marathon-frontend
|
|
|
|
|
ports:
|
|
|
|
|
- "3000:80"
|
|
|
|
|
depends_on:
|
|
|
|
|
- backend
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
nginx:
|
|
|
|
|
image: nginx:alpine
|
|
|
|
|
container_name: marathon-nginx
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
|
- ./backend/uploads:/app/uploads:ro
|
|
|
|
|
depends_on:
|
|
|
|
|
- frontend
|
|
|
|
|
- backend
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|