docker-compose.yml 429 B

1234567891011121314151617181920
  1. services:
  2. postgres:
  3. image: postgres:15
  4. restart: unless-stopped
  5. ports:
  6. - "5432:5432"
  7. environment:
  8. POSTGRES_USER: username
  9. POSTGRES_PASSWORD: password
  10. POSTGRES_DB: workout_cool
  11. volumes:
  12. - pgdata:/var/lib/postgresql/data
  13. healthcheck:
  14. test: ["CMD-SHELL", "pg_isready -U username -d workout_cool"]
  15. interval: 5s
  16. timeout: 5s
  17. retries: 5
  18. volumes:
  19. pgdata: