feature: add scheduler

This commit is contained in:
2025-12-06 18:25:08 +05:00
parent 3cc360c8b9
commit a5d3a72d0c
7 changed files with 182 additions and 11 deletions

View File

@@ -6,12 +6,8 @@ services:
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"
env_file:
- .env
ports:
- "8000:8000"
networks:
@@ -21,7 +17,13 @@ services:
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()"]
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://localhost:8000/health').read()",
]
interval: 30s
timeout: 3s
start_period: 10s