Files
lms-it-oms/docker-compose.yml

47 lines
1.2 KiB
YAML
Raw Permalink 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.
# Управление ИТ (ОМС) — система дистанционного обучения
# Сервисы: app (FastAPI + статика), db (PostgreSQL)
services:
app:
build:
context: ./backend
dockerfile: Dockerfile
ports:
- "8000:8000"
environment:
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_DB: ${POSTGRES_DB:-lms_it_oms}
POSTGRES_USER: ${POSTGRES_USER:-lms}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
CONTENT_PATH: /content
volumes:
- ./content:/content:ro
depends_on:
db:
condition: service_healthy
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-lms_it_oms}
POSTGRES_USER: ${POSTGRES_USER:-lms}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- lms_it_oms_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-lms} -d ${POSTGRES_DB:-lms_it_oms}"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
volumes:
lms_it_oms_data: