docker-compose.yml 574 B

123456789101112131415161718192021222324252627282930313233
  1. version: "3.8"
  2. services:
  3. db:
  4. image: postgres:15
  5. restart: always
  6. ports:
  7. - "6000:5432"
  8. environment:
  9. POSTGRES_USER: postgres123
  10. POSTGRES_PASSWORD: postgres123
  11. POSTGRES_DB: db_radar
  12. volumes:
  13. - postgres-data:/var/lib/postgresql/data
  14. healthcheck:
  15. test: ["CMD-SHELL", "pg_isready -U postgres123"]
  16. interval: 5s
  17. timeout: 3s
  18. retries: 5
  19. api:
  20. build: .
  21. ports:
  22. - "3200:3200"
  23. env_file:
  24. - .env
  25. depends_on:
  26. db:
  27. condition: service_healthy
  28. volumes:
  29. postgres-data: