Files
g2s-aggregator/docker-compose.template.yml
T

92 lines
2.7 KiB
YAML

services:
app:
image: gitea.p4r4dls.ru/yusupal1ev/g2s-aggregator:0.0.9
container_name: g2s-aggregator
ports:
- "8003:8000"
depends_on:
redis:
condition: service_started
postgres:
condition: service_healthy
migrations:
condition: service_completed_successfully
volumes:
- ./config.yaml:/config.yaml
restart: unless-stopped
logging:
driver: "json-file"
options:
tag: "g2s-aggregator"
redis:
image: redis:7-alpine
container_name: redis
command: ["redis-server", "--save", "", "--appendonly", "no"]
ports:
- "6379:6379"
restart: unless-stopped
postgres:
image: postgres:16-alpine
container_name: postgres
environment:
POSTGRES_DB: g2s_aggregator
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "5432:5432"
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d g2s_aggregator"]
interval: 5s
timeout: 3s
retries: 10
migrations:
image: gitea.p4r4dls.ru/yusupal1ev/g2s-aggregator:0.0.9
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: gitea.p4r4dls.ru/yusupal1ev/g2s-aggregator:0.0.9
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: gitea.p4r4dls.ru/yusupal1ev/g2s-aggregator:0.0.9
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
otel-collector:
image: otel/opentelemetry-collector-contrib:latest
container_name: otel-collector
user: "0"
volumes:
- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
- /var/lib/docker/containers:/var/lib/docker/containers:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped
command: ["--config=/etc/otel-collector-config.yaml"]
volumes:
postgres: