docker-compose.yml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. history-v1:
  67. build:
  68. context: ..
  69. dockerfile: services/history-v1/Dockerfile
  70. env_file:
  71. - dev.env
  72. environment:
  73. OVERLEAF_EDITOR_ANALYTICS_BUCKET: "/buckets/analytics"
  74. OVERLEAF_EDITOR_BLOBS_BUCKET: "/buckets/blobs"
  75. OVERLEAF_EDITOR_CHUNKS_BUCKET: "/buckets/chunks"
  76. OVERLEAF_EDITOR_PROJECT_BLOBS_BUCKET: "/buckets/project_blobs"
  77. OVERLEAF_EDITOR_ZIPS_BUCKET: "/buckets/zips"
  78. PERSISTOR_BACKEND: fs
  79. volumes:
  80. - history-v1-buckets:/buckets
  81. mongo:
  82. image: mongo:6.0
  83. command: --replSet overleaf
  84. ports:
  85. - "127.0.0.1:27017:27017" # for debugging
  86. volumes:
  87. - mongo-data:/data/db
  88. - ../bin/shared/mongodb-init-replica-set.js:/docker-entrypoint-initdb.d/mongodb-init-replica-set.js
  89. environment:
  90. MONGO_INITDB_DATABASE: sharelatex
  91. extra_hosts:
  92. # Required when using the automatic database setup for initializing the
  93. # replica set. This override is not needed when running the setup after
  94. # starting up mongo.
  95. - mongo:127.0.0.1
  96. notifications:
  97. build:
  98. context: ..
  99. dockerfile: services/notifications/Dockerfile
  100. env_file:
  101. - dev.env
  102. project-history:
  103. build:
  104. context: ..
  105. dockerfile: services/project-history/Dockerfile
  106. env_file:
  107. - dev.env
  108. real-time:
  109. build:
  110. context: ..
  111. dockerfile: services/real-time/Dockerfile
  112. env_file:
  113. - dev.env
  114. redis:
  115. image: redis:5
  116. ports:
  117. - "127.0.0.1:6379:6379" # for debugging
  118. volumes:
  119. - redis-data:/data
  120. web:
  121. build:
  122. context: ..
  123. dockerfile: services/web/Dockerfile
  124. target: dev
  125. env_file:
  126. - dev.env
  127. environment:
  128. - APP_NAME=Overleaf Community Edition
  129. - ENABLED_LINKED_FILE_TYPES=project_file,project_output_file
  130. - EMAIL_CONFIRMATION_DISABLED=true
  131. - NODE_ENV=development
  132. - OVERLEAF_ALLOW_PUBLIC_ACCESS=true
  133. command: ["node", "app.mjs"]
  134. volumes:
  135. - sharelatex-data:/var/lib/overleaf
  136. - web-data:/overleaf/services/web/data
  137. depends_on:
  138. - mongo
  139. - redis
  140. - chat
  141. - clsi
  142. - contacts
  143. - docstore
  144. - document-updater
  145. - filestore
  146. - history-v1
  147. - notifications
  148. - project-history
  149. - real-time
  150. webpack:
  151. build:
  152. context: ..
  153. dockerfile: services/web/Dockerfile
  154. target: webpack
  155. command: ["npx", "webpack", "serve", "--config", "webpack.config.dev-env.js"]
  156. ports:
  157. - "127.0.0.1:80:3808"
  158. volumes:
  159. - ./webpack.config.dev-env.js:/overleaf/services/web/webpack.config.dev-env.js