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: - "5432: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: - "6379:6379" volumes: - ./data/redis:/data healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 10s retries: 3