docker-compose.yml 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  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. clsi-nginx:
  37. image: nginx:1.28
  38. read_only: true
  39. tmpfs:
  40. - /tmp
  41. - /var/cache/nginx
  42. - /run
  43. volumes:
  44. - ${PWD}/output:/output:ro
  45. - ../services/clsi/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
  46. contacts:
  47. build:
  48. context: ..
  49. dockerfile: services/contacts/Dockerfile
  50. env_file:
  51. - dev.env
  52. docstore:
  53. build:
  54. context: ..
  55. dockerfile: services/docstore/Dockerfile
  56. env_file:
  57. - dev.env
  58. document-updater:
  59. build:
  60. context: ..
  61. dockerfile: services/document-updater/Dockerfile
  62. env_file:
  63. - dev.env
  64. filestore:
  65. build:
  66. context: ..
  67. dockerfile: services/filestore/Dockerfile
  68. env_file:
  69. - dev.env
  70. # environment:
  71. # - ENABLE_CONVERSIONS=true
  72. volumes:
  73. - filestore-public-files:/overleaf/services/filestore/public_files
  74. - filestore-template-files:/overleaf/services/filestore/template_files
  75. - filestore-uploads:/overleaf/services/filestore/uploads
  76. history-v1:
  77. build:
  78. context: ..
  79. dockerfile: services/history-v1/Dockerfile
  80. env_file:
  81. - dev.env
  82. environment:
  83. OVERLEAF_EDITOR_ANALYTICS_BUCKET: "/buckets/analytics"
  84. OVERLEAF_EDITOR_BLOBS_BUCKET: "/buckets/blobs"
  85. OVERLEAF_EDITOR_CHUNKS_BUCKET: "/buckets/chunks"
  86. OVERLEAF_EDITOR_PROJECT_BLOBS_BUCKET: "/buckets/project_blobs"
  87. OVERLEAF_EDITOR_ZIPS_BUCKET: "/buckets/zips"
  88. PERSISTOR_BACKEND: fs
  89. volumes:
  90. - history-v1-buckets:/buckets
  91. mongo:
  92. image: mongo:6.0
  93. command: --replSet overleaf
  94. ports:
  95. - "127.0.0.1:27017:27017" # for debugging
  96. volumes:
  97. - mongo-data:/data/db
  98. - ../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  99. environment:
  100. MONGO_INITDB_DATABASE: sharelatex
  101. extra_hosts:
  102. # Required when using the automatic database setup for initializing the
  103. # replica set. This override is not needed when running the setup after
  104. # starting up mongo.
  105. - mongo:127.0.0.1
  106. notifications:
  107. build:
  108. context: ..
  109. dockerfile: services/notifications/Dockerfile
  110. env_file:
  111. - dev.env
  112. project-history:
  113. build:
  114. context: ..
  115. dockerfile: services/project-history/Dockerfile
  116. env_file:
  117. - dev.env
  118. real-time:
  119. build:
  120. context: ..
  121. dockerfile: services/real-time/Dockerfile
  122. env_file:
  123. - dev.env
  124. redis:
  125. image: redis:5
  126. ports:
  127. - "127.0.0.1:6379:6379" # for debugging
  128. volumes:
  129. - redis-data:/data
  130. web:
  131. build:
  132. context: ..
  133. dockerfile: services/web/Dockerfile
  134. target: dev
  135. env_file:
  136. - dev.env
  137. environment:
  138. - APP_NAME=Overleaf Community Edition
  139. - ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
  140. - EMAIL_CONFIRMATION_DISABLED=true
  141. - NODE_ENV=development
  142. - OVERLEAF_ALLOW_PUBLIC_ACCESS=true
  143. command: ["node", "app.mjs"]
  144. volumes:
  145. - sharelatex-data:/var/lib/overleaf
  146. - web-data:/overleaf/services/web/data
  147. depends_on:
  148. - mongo
  149. - redis
  150. - chat
  151. - clsi
  152. - contacts
  153. - docstore
  154. - document-updater
  155. - filestore
  156. - history-v1
  157. - notifications
  158. - project-history
  159. - real-time
  160. webpack:
  161. build:
  162. context: ..
  163. dockerfile: services/web/Dockerfile
  164. target: webpack
  165. command:
  166. ["npx", "webpack", "serve", "--config", "webpack.config.dev-env.js"]
  167. ports:
  168. - "127.0.0.1:80:3808"
  169. volumes:
  170. - ./webpack.config.dev-env.js:/overleaf/services/web/webpack.config.dev-env.js