docker-compose.debug.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # Docker Compose creates multiple containers on a single machine.
  2. # run `docker-compose up` to create and run/link the containers
  3. # https://github.com/NREL/OpenStudio-server/blob/develop/docker-compose.yml
  4. version: '3.4'
  5. services:
  6. db:
  7. image: mongo:6.0.7
  8. ports:
  9. - "27017:27017"
  10. volumes:
  11. - dbdata:/data/db
  12. environment:
  13. MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
  14. MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
  15. command: "mongod --setParameter internalQueryMaxAddToSetBytes=${MONGO_MEM} --setParameter internalQueryMaxBlockingSortMemoryUsageBytes=${MONGO_MEM}"
  16. queue:
  17. image: redis:6.0.9
  18. ports:
  19. - "6379:6379"
  20. command: "redis-server --requirepass ${REDIS_PASSWORD}"
  21. web:
  22. image: nrel/openstudio-server:latest
  23. build:
  24. context: .
  25. target: base
  26. args:
  27. rails_env: docker
  28. environment:
  29. - OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
  30. - QUEUES=analysis_wrappers
  31. - REDIS_URL=${REDIS_URL}
  32. - MONGO_USER=${MONGO_USER}
  33. - MONGO_PASSWORD=${MONGO_PASSWORD}
  34. - SECRET_KEY_BASE=${SECRET_KEY_BASE}
  35. depends_on:
  36. - db
  37. - queue
  38. ports:
  39. - "8080:80"
  40. volumes:
  41. - osdata:/mnt/openstudio
  42. command: /usr/local/bin/start-server
  43. web-background:
  44. image: nrel/openstudio-server:latest
  45. build:
  46. context: .
  47. target: base
  48. args:
  49. rails_env: docker
  50. environment:
  51. - OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
  52. - QUEUES=background,analyses
  53. - REDIS_URL=${REDIS_URL}
  54. - MONGO_USER=${MONGO_USER}
  55. - MONGO_PASSWORD=${MONGO_PASSWORD}
  56. - SECRET_KEY_BASE=${SECRET_KEY_BASE}
  57. depends_on:
  58. - db
  59. - queue
  60. - web
  61. volumes:
  62. - osdata:/mnt/openstudio
  63. command: /usr/local/bin/start-web-background
  64. worker:
  65. image: nrel/openstudio-server:latest
  66. build:
  67. context: .
  68. target: base
  69. args:
  70. rails_env: docker
  71. environment:
  72. - OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
  73. - QUEUES=simulations
  74. - COUNT=1
  75. - REDIS_URL=${REDIS_URL}
  76. - MONGO_USER=${MONGO_USER}
  77. - MONGO_PASSWORD=${MONGO_PASSWORD}
  78. - SECRET_KEY_BASE=${SECRET_KEY_BASE}
  79. depends_on:
  80. - web
  81. - db
  82. - queue
  83. - rserve
  84. command: /usr/local/bin/start-workers
  85. rserve:
  86. image: nrel/openstudio-rserve:latest
  87. build: ./docker/R
  88. environment:
  89. - OS_SERVER_NUMBER_OF_WORKERS=${OS_SERVER_NUMBER_OF_WORKERS}
  90. - REDIS_URL=${REDIS_URL}
  91. - MONGO_USER=${MONGO_USER}
  92. - MONGO_PASSWORD=${MONGO_PASSWORD}
  93. - SECRET_KEY_BASE=${SECRET_KEY_BASE}
  94. volumes:
  95. - osdata:/mnt/openstudio
  96. depends_on:
  97. - web
  98. - web-background
  99. - db
  100. volumes:
  101. osdata:
  102. external: true
  103. dbdata:
  104. external: true