Files
g2s-aggregator/docker-compose.yml
T
2026-05-13 16:35:22 +03:00

50 lines
1.2 KiB
YAML

services:
app:
image: yusupal1ev/g2s-aggregator:0.0.2
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.2
container_name: g2s-aggregator-migrations
depends_on:
postgres:
condition: service_healthy
volumes:
- ./config.yaml:/config.yaml
command: ["poetry", "run", "alembic", "upgrade", "head"]
restart: "no"
volumes:
postgres: