services: db: image: postgres:15.10 container_name: db restart: unless-stopped environment: POSTGRES_DB: ${POSTGRES_DB:-mostovik} POSTGRES_USER: ${POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres} volumes: - ./data/db:/var/lib/postgresql/data - ./docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql ports: - "${MOSTOVIK_POSTGRES_HOST_PORT:-15432}:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 30s timeout: 10s retries: 3 db_exchange_target: image: postgres:15.10 container_name: db_exchange_target restart: unless-stopped environment: POSTGRES_DB: ${TARGET_POSTGRES_DB:-mostovik_target} POSTGRES_USER: ${TARGET_POSTGRES_USER:-postgres} POSTGRES_PASSWORD: ${TARGET_POSTGRES_PASSWORD:-postgres} volumes: - ./data/db_exchange_target:/var/lib/postgresql/data ports: - "${MOSTOVIK_TARGET_POSTGRES_HOST_PORT:-15433}:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 30s timeout: 10s retries: 3 redis: image: redis:7-alpine container_name: redis restart: unless-stopped ports: - "${MOSTOVIK_REDIS_HOST_PORT:-16379}:6379" volumes: - ./data/redis:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 10s retries: 3