version: '3.8' services: postgres: image: postgres:16-alpine environment: POSTGRES_DB: ${POSTGRES_DB} POSTGRES_USER: ${POSTGRES_USER} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} DOCKER_ENV: 1 ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 30s timeout: 10s retries: 5 redis: image: redis/redis-stack:latest ports: - "6379:6379" - "8001:8001" environment: DOCKER_ENV: 1 healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 30s timeout: 5s retries: 5 flower: image: mher/flower:0.9.7 environment: DOCKER_ENV: 1 command: ["flower", "--broker=${BROKER_URL}", "--port=5555"] ports: - 5557:5555 depends_on: - redis volumes: postgres_data: networks: my_network: driver: bridge