services: postgres: image: postgres:15 ports: - "${DB_PORT:-5432}:5432" volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] interval: 5s timeout: 5s retries: 5 env_file: .env workout_cool: build: context: . dockerfile: Dockerfile ports: - "${APP_PORT:-3000}:3000" depends_on: postgres: condition: service_healthy env_file: .env volumes: pgdata: