docker-compose.yml 532 B

1234567891011121314151617181920212223242526
  1. services:
  2. postgres:
  3. image: postgres:15
  4. ports:
  5. - "${DB_PORT:-5432}:5432"
  6. volumes:
  7. - pgdata:/var/lib/postgresql/data
  8. healthcheck:
  9. test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
  10. interval: 5s
  11. timeout: 5s
  12. retries: 5
  13. env_file: .env
  14. workout_cool:
  15. build:
  16. context: .
  17. dockerfile: Dockerfile
  18. ports:
  19. - "${APP_PORT:-3000}:3000"
  20. depends_on:
  21. postgres:
  22. condition: service_healthy
  23. env_file: .env
  24. volumes:
  25. pgdata: