services: postgres: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_USER: ${POSTGRES_USER:-batchcooking} POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-batchcooking} POSTGRES_DB: ${POSTGRES_DB:-batchcooking} ports: - "${POSTGRES_PORT:-5432}:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-batchcooking}"] interval: 5s timeout: 5s retries: 5 volumes: postgres_data: