docker-compose.deploy.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch
  28. - ENABLE_SUBPATH_BASED_ACCESS=true
  29. env_file:
  30. - ./.env
  31. depends_on:
  32. hoppscotch-db:
  33. condition: service_healthy
  34. command: ["sh", "-c", "pnpm exec prisma migrate deploy && node /usr/src/app/aio_run.mjs"]
  35. healthcheck:
  36. test:
  37. - CMD
  38. - curl
  39. - '-f'
  40. - 'http://localhost:80'
  41. interval: 2s
  42. timeout: 10s
  43. retries: 30