docker-compose.deploy.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # THIS IS NOT TO BE USED FOR PERSONAL DEPLOYMENTS!
  2. # Internal Docker Compose Image used for internal testing deployments
  3. version: "3.7"
  4. services:
  5. hoppscotch-db:
  6. image: postgres:15
  7. user: postgres
  8. environment:
  9. POSTGRES_USER: postgres
  10. POSTGRES_PASSWORD: testpass
  11. POSTGRES_DB: hoppscotch
  12. healthcheck:
  13. test:
  14. [
  15. "CMD-SHELL",
  16. "sh -c 'pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}'"
  17. ]
  18. interval: 5s
  19. timeout: 5s
  20. retries: 10
  21. hoppscotch-aio:
  22. container_name: hoppscotch-aio
  23. build:
  24. dockerfile: prod.Dockerfile
  25. context: .
  26. target: aio
  27. environment:
  28. - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
  29. - ENABLE_SUBPATH_BASED_ACCESS=true
  30. env_file:
  31. - ./.env
  32. depends_on:
  33. hoppscotch-db:
  34. condition: service_healthy
  35. command: ["sh", "-c", "pnpm exec prisma migrate deploy && node /usr/src/app/aio_run.mjs"]
  36. healthcheck:
  37. test:
  38. - CMD
  39. - curl
  40. - '-f'
  41. - 'http://localhost:80'
  42. interval: 2s
  43. timeout: 10s
  44. retries: 30