version: '3.8' services: postgres: image: postgres:16-alpine container_name: workout_tracker_db restart: unless-stopped environment: POSTGRES_USER: workout_user POSTGRES_PASSWORD: workout_pass POSTGRES_DB: workout_tracker ports: - "5432:5432" volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U workout_user -d workout_tracker"] interval: 10s timeout: 5s retries: 5 volumes: postgres_data: