docker-compose.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. version: '2.2'
  2. services:
  3. sharelatex:
  4. image: ${IMAGE_TAG:-sharelatex/sharelatex:latest}
  5. container_name: sharelatex
  6. depends_on:
  7. mongo:
  8. condition: service_healthy
  9. redis:
  10. condition: service_started
  11. ports:
  12. - 80:80
  13. links:
  14. - mongo
  15. - redis
  16. environment:
  17. OVERLEAF_APP_NAME: Overleaf Community Edition
  18. OVERLEAF_MONGO_URL: mongodb://mongo/sharelatex?directConnection=true
  19. OVERLEAF_REDIS_HOST: redis
  20. REDIS_HOST: redis
  21. ENABLED_LINKED_FILE_TYPES: 'project_file,project_output_file'
  22. ENABLE_CONVERSIONS: 'true'
  23. EMAIL_CONFIRMATION_DISABLED: 'true'
  24. healthcheck:
  25. test: curl --fail http://localhost:3000/status || exit 1
  26. interval: 10s
  27. timeout: 10s
  28. retries: 10
  29. volumes:
  30. - ./util/seed-mongo.sh:/etc/my_init.d/99_seed-mongo.sh
  31. - ./util/seed-mongo.js:/overleaf/services/web/modules/server-ce-scripts/scripts/seed-mongo.js
  32. mongo:
  33. image: mongo:5.0.17
  34. container_name: mongo
  35. command: '--replSet overleaf'
  36. expose:
  37. - 27017
  38. healthcheck:
  39. # FIXME: silly hack to make sure replicaset is initialized
  40. test: 'echo ''rs.initiate({ _id: "overleaf", members: [{ _id: 0, host: "mongo:27017" }] })'' | mongo localhost:27017/test --quiet'
  41. interval: 10s
  42. timeout: 10s
  43. retries: 5
  44. redis:
  45. image: redis:7.2.1
  46. container_name: redis
  47. expose:
  48. - 6379
  49. e2e:
  50. image: cypress/included:13.3.0
  51. links:
  52. - sharelatex
  53. working_dir: /e2e
  54. volumes:
  55. - ./:/e2e
  56. environment:
  57. CYPRESS_BASE_URL: http://sharelatex
  58. SPEC_PATTERN: '**/*.spec.{js,jsx,ts,tsx}'
  59. depends_on:
  60. sharelatex:
  61. condition: service_healthy