Files
g2s-aggregator/docker-compose.yml
T
2026-05-24 00:55:09 +03:00

75 lines
2.0 KiB
YAML

services:
app:
image: yusupal1ev/g2s-aggregator:0.0.7
container_name: g2s-aggregator
ports:
- "8000:8000"
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
migrations:
condition: service_completed_successfully
volumes:
- ./config.yaml:/config.yaml
redis:
image: redis:7-alpine
container_name: redis
command: ["redis-server", "--save", "", "--appendonly", "no"]
ports:
- "6379:6379"
postgres:
image: postgres:16-alpine
container_name: postgres
environment:
POSTGRES_DB: g2s_aggregator
POSTGRES_USER: g2s_user
POSTGRES_PASSWORD: 7ed0a5a0f24be266
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U g2s_user -d g2s_aggregator"]
interval: 5s
timeout: 3s
retries: 10
migrations:
image: yusupal1ev/g2s-aggregator:0.0.7
container_name: g2s-aggregator-migrations
depends_on:
postgres:
condition: service_healthy
volumes:
- ./config.yaml:/config.yaml
command: ["poetry", "run", "alembic", "upgrade", "head"]
restart: "no"
waybill-poller:
image: yusupal1ev/g2s-aggregator:0.0.7
container_name: g2s-aggregator-waybill-poller
depends_on:
postgres:
condition: service_healthy
migrations:
condition: service_completed_successfully
volumes:
- ./config.yaml:/config.yaml
command: ["poetry", "run", "python", "-m", "app.workers.waybill_poller"]
restart: unless-stopped
waybill-email-sender:
image: yusupal1ev/g2s-aggregator:0.0.7
container_name: g2s-aggregator-waybill-email-sender
depends_on:
postgres:
condition: service_healthy
migrations:
condition: service_completed_successfully
volumes:
- ./config.yaml:/config.yaml
command:
["poetry", "run", "python", "-m", "app.workers.waybill_email_sender"]
restart: unless-stopped
volumes:
postgres: