34 lines
979 B
YAML
34 lines
979 B
YAML
version: "3.8"
|
|
|
|
services:
|
|
ingest-service:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: ingest-service
|
|
environment:
|
|
# Подключение к PostgreSQL из infra/docker-compose.yaml
|
|
DATABASE_URL: postgresql+asyncpg://postgres:postgres@ingest-postgres:5432/ingest_db
|
|
APP_HOST: 0.0.0.0
|
|
APP_PORT: 8000
|
|
DEBUG: "False"
|
|
ports:
|
|
- "8000:8000"
|
|
networks:
|
|
- call-review-network
|
|
restart: unless-stopped
|
|
# Запускаем миграции перед стартом приложения
|
|
command: >
|
|
sh -c "alembic upgrade head && uvicorn app.main:app --host 0.0.0.0 --port 8000"
|
|
healthcheck:
|
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()"]
|
|
interval: 30s
|
|
timeout: 3s
|
|
start_period: 10s
|
|
retries: 3
|
|
|
|
networks:
|
|
call-review-network:
|
|
external: true
|
|
name: call-review-network
|