docker-compose.yml 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #-------------------------------------------------------------------------------------------------------------
  2. # Copyright (c) Microsoft Corporation. All rights reserved.
  3. # Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
  4. #-------------------------------------------------------------------------------------------------------------
  5. version: '3'
  6. services:
  7. node:
  8. # Uncomment the next line to use a non-root user for all processes. You can also
  9. # simply use the "remoteUser" property in devcontainer.json if you just want VS Code
  10. # and its sub-processes (terminals, tasks, debugging) to execute as the user. On Linux,
  11. # you may need to update USER_UID and USER_GID in .devcontainer/Dockerfile to match your
  12. # user if not 1000. See https://aka.ms/vscode-remote/containers/non-root for details.
  13. user: node
  14. build:
  15. context: .
  16. dockerfile: Dockerfile
  17. ports:
  18. - 3000:3000
  19. - 3001:3001 # for browser-sync
  20. volumes:
  21. - ..:/workspace/growi:cached
  22. - /workspace/growi/node_modules
  23. - ../../growi-docker-compose:/workspace/growi-docker-compose:cached
  24. - ../../node_modules:/workspace/node_modules:cached
  25. # Overrides default command so things don't shut down after the process ends.
  26. command: sleep infinity
  27. links:
  28. - mongo
  29. - elasticsearch
  30. - hackmd
  31. mongo:
  32. image: mongo:3.6
  33. restart: unless-stopped
  34. ports:
  35. - 27017:27017
  36. volumes:
  37. - /data/db
  38. # This container requires '../../growi-docker-compose' repository
  39. # cloned from https://github.com/weseek/growi-docker-compose.git
  40. elasticsearch:
  41. build:
  42. context: ../../growi-docker-compose/elasticsearch
  43. dockerfile: ./Dockerfile
  44. restart: unless-stopped
  45. ports:
  46. - 9200:9200
  47. environment:
  48. - bootstrap.memory_lock=true
  49. - "ES_JAVA_OPTS=-Xms256m -Xmx256m"
  50. ulimits:
  51. memlock:
  52. soft: -1
  53. hard: -1
  54. volumes:
  55. - /usr/share/elasticsearch/data
  56. - ../../growi-docker-compose/elasticsearch/config/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
  57. elasticsearch-head:
  58. image: tobias74/elasticsearch-head:6
  59. restart: unless-stopped
  60. ports:
  61. - 9100:9100
  62. # This container requires '../../growi-docker-compose' repository
  63. # cloned from https://github.com/weseek/growi-docker-compose.git
  64. hackmd:
  65. build:
  66. context: ../../growi-docker-compose/hackmd
  67. restart: unless-stopped
  68. environment:
  69. - GROWI_URI=http://localhost:3000
  70. # define 'storage' option value
  71. # see https://github.com/sequelize/cli/blob/7160d0/src/helpers/config-helper.js#L192
  72. - CMD_DB_URL=sqlite://dummyhost/hackmd/sqlite/codimd.db
  73. - CMD_CSP_ENABLE=false
  74. ports:
  75. - 3010:3000
  76. volumes:
  77. - /files/sqlite