Updated docker

This commit is contained in:
2025-11-20 23:34:49 +07:00
parent f2fca50d5a
commit 5d5b6140d4
5 changed files with 148 additions and 9 deletions

View File

@@ -0,0 +1,32 @@
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
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