docker-compose.yml 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307
  1. # Complete joystream development network
  2. version: '3.4'
  3. services:
  4. joystream-node:
  5. image: joystream/node:$JOYSTREAM_NODE_TAG
  6. restart: unless-stopped
  7. container_name: joystream-node
  8. volumes:
  9. - chain-data:/data
  10. command: --dev --alice --validator --unsafe-ws-external --unsafe-rpc-external --rpc-methods Safe --rpc-cors=all --log runtime --base-path /data
  11. ports:
  12. - 9944:9944
  13. - 9933:9933
  14. colossus-1:
  15. image: node:14
  16. container_name: colossus-1
  17. restart: on-failure
  18. volumes:
  19. - colossus-1-data:/data
  20. - colossus-1-keystore:/keystore
  21. - colossus-1-logs:/logs
  22. - type: bind
  23. source: .
  24. target: /joystream
  25. working_dir: /joystream/storage-node
  26. ports:
  27. - 3333:3333
  28. env_file:
  29. # relative to working directory where docker-compose was run from
  30. - .env
  31. environment:
  32. # ACCOUNT_URI overrides command line arg --accountUri
  33. - ACCOUNT_URI=${COLOSSUS_1_TRANSACTOR_URI}
  34. command: [
  35. 'yarn', 'storage-node', 'server', '--worker=${COLOSSUS_1_WORKER_ID}', '--port=3333', '--uploads=/data',
  36. '--sync', '--syncInterval=1',
  37. '--queryNodeEndpoint=${COLOSSUS_QUERY_NODE_URL}',
  38. '--apiUrl=${JOYSTREAM_NODE_WS}',
  39. '--logFilePath=/logs'
  40. ]
  41. distributor-1:
  42. image: node:14
  43. container_name: distributor-1
  44. restart: on-failure
  45. volumes:
  46. - distributor-1-data:/data
  47. - distributor-1-cache:/cache
  48. - distributor-1-logs:/logs
  49. - type: bind
  50. source: .
  51. target: /joystream
  52. # let the working_dir be the distributor node to pickup the config.yml file
  53. working_dir: /joystream/distributor-node
  54. ports:
  55. - 3334:3334
  56. - 127.0.0.1:4334:4334
  57. env_file:
  58. # relative to working directory where docker-compose was run from
  59. - .env
  60. # Node configuration can be overriden via env, for exampe:
  61. environment:
  62. JOYSTREAM_DISTRIBUTOR__ID: distributor-1
  63. JOYSTREAM_DISTRIBUTOR__ENDPOINTS__QUERY_NODE: ${DISTRIBUTOR_QUERY_NODE_URL}
  64. JOYSTREAM_DISTRIBUTOR__KEYS: "[{\"suri\":\"${DISTRIBUTOR_1_ACCOUNT_URI}\"}]"
  65. JOYSTREAM_DISTRIBUTOR__WORKER_ID: ${DISTRIBUTOR_1_WORKER_ID}
  66. JOYSTREAM_DISTRIBUTOR__PUBLIC_API__PORT: 3334
  67. JOYSTREAM_DISTRIBUTOR__OPERATOR_API__PORT: 4334
  68. JOYSTREAM_DISTRIBUTOR__ENDPOINTS__JOYSTREAM_NODE_WS: ${JOYSTREAM_NODE_WS}
  69. JOYSTREAM_DISTRIBUTOR__DIRECTORIES__ASSETS: /data
  70. JOYSTREAM_DISTRIBUTOR__DIRECTORIES__CACHE_STATE: /cache
  71. JOYSTREAM_DISTRIBUTOR__LOGS__FILE__PATH: /logs
  72. # JOYSTREAM_DISTRIBUTOR__ENDPOINTS__ELASTIC_SEARCH: es-endpoint
  73. # JOYSTREAM_DISTRIBUTOR__LOGS__CONSOLE: "off"
  74. # JOYSTREAM_DISTRIBUTOR__LOGS__FILE: "off"
  75. # JOYSTREAM_DISTRIBUTOR__LOGS__ELASTIC: "off"
  76. # JOYSTREAM_DISTRIBUTOR__LIMITS__STORAGE: 50G
  77. # JOYSTREAM_DISTRIBUTOR__BUCKETS: "[\"1:0\",\"1:1\"]"
  78. command: ['yarn', 'joystream-distributor', 'start']
  79. colossus-2:
  80. image: node:14
  81. container_name: colossus-2
  82. restart: on-failure
  83. volumes:
  84. - colossus-2-data:/data
  85. - colossus-2-keystore:/keystore
  86. - colossus-2-logs:/logs
  87. - type: bind
  88. source: .
  89. target: /joystream
  90. working_dir: /joystream/storage-node
  91. ports:
  92. - 3335:3333
  93. env_file:
  94. # relative to working directory where docker-compose was run from
  95. - .env
  96. environment:
  97. # ACCOUNT_URI overrides command line arg --accountUri
  98. - ACCOUNT_URI=${COLOSSUS_2_TRANSACTOR_URI}
  99. command: [
  100. 'yarn', 'storage-node', 'server', '--worker=${COLOSSUS_2_WORKER_ID}', '--port=3333', '--uploads=/data',
  101. '--sync', '--syncInterval=1',
  102. '--queryNodeEndpoint=${COLOSSUS_QUERY_NODE_URL}',
  103. '--apiUrl=${JOYSTREAM_NODE_WS}',
  104. '--logFilePath=/logs'
  105. ]
  106. distributor-2:
  107. image: node:14
  108. container_name: distributor-2
  109. restart: on-failure
  110. volumes:
  111. - distributor-2-data:/data
  112. - distributor-2-cache:/cache
  113. - distributor-2-logs:/logs
  114. - type: bind
  115. source: .
  116. target: /joystream
  117. # let the working_dir be the distributor node to pickup the config.yml file
  118. working_dir: /joystream/distributor-node
  119. ports:
  120. - 3336:3334
  121. - 127.0.0.1:4336:4334
  122. env_file:
  123. # relative to working directory where docker-compose was run from
  124. - .env
  125. # Node configuration can be overriden via env, for exampe:
  126. environment:
  127. JOYSTREAM_DISTRIBUTOR__ID: distributor-2
  128. JOYSTREAM_DISTRIBUTOR__ENDPOINTS__QUERY_NODE: ${DISTRIBUTOR_QUERY_NODE_URL}
  129. JOYSTREAM_DISTRIBUTOR__KEYS: "[{\"suri\":\"${DISTRIBUTOR_2_ACCOUNT_URI}\"}]"
  130. JOYSTREAM_DISTRIBUTOR__WORKER_ID: ${DISTRIBUTOR_2_WORKER_ID}
  131. JOYSTREAM_DISTRIBUTOR__PUBLIC_API__PORT: 3334
  132. JOYSTREAM_DISTRIBUTOR__OPERATOR_API__PORT: 4334
  133. JOYSTREAM_DISTRIBUTOR__ENDPOINTS__JOYSTREAM_NODE_WS: ${JOYSTREAM_NODE_WS}
  134. JOYSTREAM_DISTRIBUTOR__DIRECTORIES__ASSETS: /data
  135. JOYSTREAM_DISTRIBUTOR__DIRECTORIES__CACHE_STATE: /cache
  136. JOYSTREAM_DISTRIBUTOR__LOGS__FILE__PATH: /logs
  137. # JOYSTREAM_DISTRIBUTOR__ENDPOINTS__ELASTIC_SEARCH: es-endpoint
  138. # JOYSTREAM_DISTRIBUTOR__LOGS__CONSOLE: "off"
  139. # JOYSTREAM_DISTRIBUTOR__LOGS__FILE: "off"
  140. # JOYSTREAM_DISTRIBUTOR__LOGS__ELASTIC: "off"
  141. # JOYSTREAM_DISTRIBUTOR__LIMITS__STORAGE: 50G
  142. # JOYSTREAM_DISTRIBUTOR__BUCKETS: "[\"1:0\",\"1:1\"]"
  143. command: ['yarn', 'joystream-distributor', 'start']
  144. graphql-server:
  145. image: node:14
  146. container_name: graphql-server
  147. restart: unless-stopped
  148. env_file:
  149. # relative to working directory where docker-compose was run from
  150. - .env
  151. environment:
  152. - DB_HOST=${DB_HOST}
  153. - WARTHOG_APP_PORT=${GRAPHQL_SERVER_PORT}
  154. - GRAPHQL_PLAYGROUND_ENDPOINT=${GRAPHQL_PLAYGROUND_ENDPOINT}
  155. - GRAPHQL_PLAYGROUND_SUBSCRIPTION_ENDPOINT=${GRAPHQL_PLAYGROUND_SUBSCRIPTION_ENDPOINT}
  156. - GRAPHQL_PLAYGROUND_CDN_URL=${GRAPHQL_PLAYGROUND_CDN_URL}
  157. ports:
  158. - "${GRAPHQL_SERVER_PORT}:${GRAPHQL_SERVER_PORT}"
  159. volumes:
  160. - type: bind
  161. source: .
  162. target: /joystream
  163. working_dir: /joystream
  164. command: ['yarn', 'workspace', 'query-node-root', 'query-node:start:prod']
  165. processor:
  166. image: node:14
  167. container_name: processor
  168. restart: unless-stopped
  169. env_file:
  170. # relative to working directory where docker-compose was run from
  171. - .env
  172. environment:
  173. - INDEXER_ENDPOINT_URL=${PROCESSOR_INDEXER_GATEWAY}
  174. - TYPEORM_HOST=${DB_HOST}
  175. - TYPEORM_DATABASE=${DB_NAME}
  176. volumes:
  177. - type: bind
  178. source: .
  179. target: /joystream
  180. working_dir: /joystream
  181. command: ['yarn', 'workspace', 'query-node-root', 'processor:start']
  182. indexer:
  183. image: joystream/hydra-indexer:3.0.0
  184. container_name: indexer
  185. restart: unless-stopped
  186. env_file:
  187. # relative to working directory where docker-compose was run from
  188. - .env
  189. environment:
  190. - DB_NAME=${INDEXER_DB_NAME}
  191. - INDEXER_WORKERS=5
  192. - REDIS_URI=redis://redis:6379/0
  193. - TYPES_JSON=types.json
  194. - WS_PROVIDER_ENDPOINT_URI=${JOYSTREAM_NODE_WS}
  195. - DB_HOST=${DB_HOST}
  196. depends_on:
  197. - redis
  198. volumes:
  199. - ./types/augment/all/defs.json:/home/hydra/packages/hydra-indexer/types.json
  200. command: >
  201. sh -c "yarn db:bootstrap && yarn start:prod"
  202. hydra-indexer-gateway:
  203. image: joystream/hydra-indexer-gateway:3.0.0
  204. container_name: hydra-indexer-gateway
  205. restart: unless-stopped
  206. env_file:
  207. # relative to working directory where docker-compose was run from
  208. - .env
  209. environment:
  210. - WARTHOG_STARTER_DB_DATABASE=${INDEXER_DB_NAME}
  211. - WARTHOG_STARTER_DB_HOST=${DB_HOST}
  212. - WARTHOG_STARTER_DB_PASSWORD=${DB_PASS}
  213. - WARTHOG_STARTER_DB_PORT=${DB_PORT}
  214. - WARTHOG_STARTER_DB_USERNAME=${DB_USER}
  215. - WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
  216. - WARTHOG_APP_PORT=${HYDRA_INDEXER_GATEWAY_PORT}
  217. - PORT=${HYDRA_INDEXER_GATEWAY_PORT}
  218. - DEBUG=*
  219. ports:
  220. - "${HYDRA_INDEXER_GATEWAY_PORT}:${HYDRA_INDEXER_GATEWAY_PORT}"
  221. depends_on:
  222. - redis
  223. redis:
  224. image: redis:6.0-alpine
  225. container_name: redis
  226. restart: unless-stopped
  227. ports:
  228. - "127.0.0.1:6379:6379"
  229. faucet:
  230. image: joystream/faucet:olympia
  231. restart: on-failure
  232. container_name: faucet
  233. env_file:
  234. - .env
  235. environment:
  236. - SCREENING_AUTHORITY_SEED=${SCREENING_AUTHORITY_SEED}
  237. - PORT=3002
  238. - INVITING_MEMBER_ID=${INVITING_MEMBER_ID}
  239. - PROVIDER=${JOYSTREAM_NODE_WS}
  240. ports:
  241. - "3002:3002"
  242. orion:
  243. container_name: orion
  244. image: joystream/orion
  245. environment:
  246. - ORION_PORT=6116
  247. - ORION_MONGO_HOSTNAME=mongo
  248. - ORION_FEATURED_CONTENT_SECRET=password123
  249. - ORION_QUERY_NODE_URL=http://graphql-server:${GRAPHQL_SERVER_PORT}/graphql
  250. ports:
  251. - "6116:6116"
  252. restart: always
  253. # mongo:
  254. # restart: always
  255. # container_name: mongo
  256. # image: library/mongo:4.4
  257. # volumes:
  258. # - orion-mongo-data:/data/db
  259. volumes:
  260. chain-data:
  261. driver: local
  262. query-node-data:
  263. driver: local
  264. colossus-1-data:
  265. driver: local
  266. colossus-1-keystore:
  267. driver: local
  268. colossus-1-logs:
  269. driver: local
  270. colossus-2-data:
  271. driver: local
  272. colossus-2-keystore:
  273. driver: local
  274. colossus-2-logs:
  275. driver: local
  276. distributor-1-logs:
  277. driver: local
  278. distributor-1-cache:
  279. driver: local
  280. distributor-1-data:
  281. driver: local
  282. distributor-2-logs:
  283. driver: local
  284. distributor-2-cache:
  285. driver: local
  286. distributor-2-data:
  287. driver: local
  288. orion-mongo-data:
  289. driver: local
  290. networks:
  291. mynet:
  292. name: mynet
  293. external: true