docker-compose.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. volumes:
  2. clsi-cache:
  3. filestore-public-files:
  4. filestore-template-files:
  5. filestore-uploads:
  6. filestore-user-files:
  7. mongo-data:
  8. redis-data:
  9. sharelatex-data:
  10. web-data:
  11. history-v1-buckets:
  12. services:
  13. chat:
  14. build:
  15. context: ..
  16. dockerfile: services/chat/Dockerfile
  17. env_file:
  18. - dev.env
  19. clsi:
  20. build:
  21. context: ..
  22. dockerfile: services/clsi/Dockerfile
  23. env_file:
  24. - dev.env
  25. environment:
  26. - TEXLIVE_IMAGE=texlive-full # docker build texlive -t texlive-full
  27. - SANDBOXED_COMPILES=true
  28. - SANDBOXED_COMPILES_HOST_DIR_COMPILES=${PWD}/compiles
  29. - SANDBOXED_COMPILES_HOST_DIR_OUTPUT=${PWD}/output
  30. user: root
  31. volumes:
  32. - ${PWD}/compiles:/overleaf/services/clsi/compiles
  33. - ${PWD}/output:/overleaf/services/clsi/output
  34. - ${DOCKER_SOCKET_PATH:-/var/run/docker.sock}:/var/run/docker.sock
  35. - clsi-cache:/overleaf/services/clsi/cache
  36. contacts:
  37. build:
  38. context: ..
  39. dockerfile: services/contacts/Dockerfile
  40. env_file:
  41. - dev.env
  42. docstore:
  43. build:
  44. context: ..
  45. dockerfile: services/docstore/Dockerfile
  46. env_file:
  47. - dev.env
  48. document-updater:
  49. build:
  50. context: ..
  51. dockerfile: services/document-updater/Dockerfile
  52. env_file:
  53. - dev.env
  54. filestore:
  55. build:
  56. context: ..
  57. dockerfile: services/filestore/Dockerfile
  58. env_file:
  59. - dev.env
  60. # environment:
  61. # - ENABLE_CONVERSIONS=true
  62. volumes:
  63. - filestore-public-files:/overleaf/services/filestore/public_files
  64. - filestore-template-files:/overleaf/services/filestore/template_files
  65. - filestore-uploads:/overleaf/services/filestore/uploads
  66. - filestore-user-files:/overleaf/services/filestore/user_files
  67. history-v1:
  68. build:
  69. context: ..
  70. dockerfile: services/history-v1/Dockerfile
  71. env_file:
  72. - dev.env
  73. environment:
  74. OVERLEAF_EDITOR_ANALYTICS_BUCKET: "/buckets/analytics"
  75. OVERLEAF_EDITOR_BLOBS_BUCKET: "/buckets/blobs"
  76. OVERLEAF_EDITOR_CHUNKS_BUCKET: "/buckets/chunks"
  77. OVERLEAF_EDITOR_PROJECT_BLOBS_BUCKET: "/buckets/project_blobs"
  78. OVERLEAF_EDITOR_ZIPS_BUCKET: "/buckets/zips"
  79. PERSISTOR_BACKEND: fs
  80. volumes:
  81. - history-v1-buckets:/buckets
  82. mongo:
  83. image: mongo:6.0
  84. command: --replSet overleaf
  85. ports:
  86. - "127.0.0.1:27017:27017" # for debugging
  87. volumes:
  88. - mongo-data:/data/db
  89. - ../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  90. environment:
  91. MONGO_INITDB_DATABASE: sharelatex
  92. extra_hosts:
  93. # Required when using the automatic database setup for initializing the
  94. # replica set. This override is not needed when running the setup after
  95. # starting up mongo.
  96. - mongo:127.0.0.1
  97. notifications:
  98. build:
  99. context: ..
  100. dockerfile: services/notifications/Dockerfile
  101. env_file:
  102. - dev.env
  103. project-history:
  104. build:
  105. context: ..
  106. dockerfile: services/project-history/Dockerfile
  107. env_file:
  108. - dev.env
  109. real-time:
  110. build:
  111. context: ..
  112. dockerfile: services/real-time/Dockerfile
  113. env_file:
  114. - dev.env
  115. redis:
  116. image: redis:5
  117. ports:
  118. - "127.0.0.1:6379:6379" # for debugging
  119. volumes:
  120. - redis-data:/data
  121. web:
  122. build:
  123. context: ..
  124. dockerfile: services/web/Dockerfile
  125. target: dev
  126. env_file:
  127. - dev.env
  128. environment:
  129. - APP_NAME=Overleaf Community Edition
  130. - ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
  131. - EMAIL_CONFIRMATION_DISABLED=true
  132. - NODE_ENV=development
  133. - OVERLEAF_ALLOW_PUBLIC_ACCESS=true
  134. command: ["node", "app.mjs"]
  135. volumes:
  136. - sharelatex-data:/var/lib/overleaf
  137. - web-data:/overleaf/services/web/data
  138. depends_on:
  139. - mongo
  140. - redis
  141. - chat
  142. - clsi
  143. - contacts
  144. - docstore
  145. - document-updater
  146. - filestore
  147. - history-v1
  148. - notifications
  149. - project-history
  150. - real-time
  151. webpack:
  152. build:
  153. context: ..
  154. dockerfile: services/web/Dockerfile
  155. target: webpack
  156. command: ["npx", "webpack", "serve", "--config", "webpack.config.dev-env.js"]
  157. ports:
  158. - "127.0.0.1:80:3808"
  159. volumes:
  160. - ./webpack.config.dev-env.js:/overleaf/services/web/webpack.config.dev-env.js