docker-compose.yml 890 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. version: "3.9"
  2. services:
  3. db:
  4. image: postgres:15
  5. restart: unless-stopped
  6. environment:
  7. POSTGRES_USER: postgres
  8. POSTGRES_PASSWORD: postgres
  9. POSTGRES_DB: schedule_management
  10. volumes:
  11. - db_data:/var/lib/postgresql/data
  12. healthcheck:
  13. test: ["CMD-SHELL", "pg_isready -U postgres -d schedule_management"]
  14. interval: 5s
  15. timeout: 5s
  16. retries: 10
  17. backend:
  18. image: schedule-management-backend:1.0.0
  19. build:
  20. context: ./backend
  21. dockerfile: Dockerfile
  22. restart: unless-stopped
  23. env_file:
  24. - deploy.env
  25. depends_on:
  26. db:
  27. condition: service_healthy
  28. frontend:
  29. image: schedule-management-frontend:1.0.0
  30. build:
  31. context: .
  32. dockerfile: docker/frontend.Dockerfile
  33. restart: unless-stopped
  34. ports:
  35. - "8080:80"
  36. depends_on:
  37. - backend
  38. volumes:
  39. db_data: