docker-compose.deploy.yml 1.3 KB

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