docker-compose.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. # Compiles new joystream/node and joystream/apps images if local images not found
  2. # and runs a complete joystream development network
  3. # To prevent build of docker images run docker-compose with "--no-build" arg
  4. version: "3.4"
  5. services:
  6. joystream-node:
  7. image: joystream/node:latest
  8. build:
  9. # context is relative to the compose file
  10. context: .
  11. # dockerfile is relative to the context
  12. dockerfile: joystream-node.Dockerfile
  13. container_name: joystream-node
  14. volumes:
  15. - /data
  16. command: --dev --alice --validator --unsafe-ws-external --unsafe-rpc-external --rpc-methods Unsafe --rpc-cors=all --log runtime --base-path /data
  17. ports:
  18. - "127.0.0.1:9944:9944"
  19. - "127.0.0.1:9933:9933"
  20. ipfs:
  21. image: ipfs/go-ipfs:latest
  22. ports:
  23. - '127.0.0.1:5001:5001'
  24. - '127.0.0.1:8080:8080'
  25. volumes:
  26. - /data/ipfs
  27. entrypoint: ''
  28. command: |
  29. /bin/sh -c "
  30. set -e
  31. /usr/local/bin/start_ipfs config profile apply lowpower
  32. /usr/local/bin/start_ipfs config --json Gateway.PublicGateways '{\"localhost\": null }'
  33. /sbin/tini -- /usr/local/bin/start_ipfs daemon --migrate=true
  34. "
  35. colossus:
  36. image: joystream/apps
  37. restart: on-failure
  38. depends_on:
  39. - "joystream-node"
  40. - "ipfs"
  41. build:
  42. context: .
  43. dockerfile: apps.Dockerfile
  44. ports:
  45. - '127.0.0.1:3001:3001'
  46. command: colossus --dev --ws-provider ws://joystream-node:9944 --ipfs-host ipfs
  47. environment:
  48. - DEBUG=*
  49. db:
  50. image: postgres:12
  51. restart: always
  52. ports:
  53. - "127.0.0.1:${DB_PORT}:5432"
  54. volumes:
  55. - /var/lib/postgresql/data
  56. env_file:
  57. # relative to working directory where docker-compose was run from
  58. - .env
  59. environment:
  60. POSTGRES_USER: ${DB_USER}
  61. POSTGRES_PASSWORD: ${DB_PASS}
  62. POSTGRES_DB: ${INDEXER_DB_NAME}
  63. graphql-server:
  64. image: joystream/apps
  65. restart: unless-stopped
  66. build:
  67. context: .
  68. dockerfile: apps.Dockerfile
  69. env_file:
  70. # relative to working directory where docker-compose was run from
  71. - .env
  72. environment:
  73. - DB_HOST=db
  74. - DB_NAME=${DB_NAME}
  75. ports:
  76. - "127.0.0.1:8081:${GRAPHQL_SERVER_PORT}"
  77. depends_on:
  78. - db
  79. command: ["workspace", "query-node-root", "server:start:prod"]
  80. processor:
  81. image: joystream/apps
  82. restart: unless-stopped
  83. build:
  84. context: .
  85. dockerfile: apps.Dockerfile
  86. env_file:
  87. # relative to working directory where docker-compose was run from
  88. - .env
  89. environment:
  90. - POLL_INTERVAL_MS=300
  91. - DEBUG=hydra-processor:*
  92. - DB_HOST=db
  93. - INDEXER_ENDPOINT_URL=http://indexer-api-gateway:4002/graphql
  94. depends_on:
  95. - indexer-api-gateway
  96. command: ["workspace", "query-node-root", "processor:start"]
  97. indexer:
  98. image: joystream/hydra-indexer:2.0.1-beta-v3.9
  99. restart: unless-stopped
  100. env_file:
  101. # relative to working directory where docker-compose was run from
  102. - .env
  103. environment:
  104. - INDEXER_WORKERS=5
  105. - REDIS_URI=redis://redis:6379/0
  106. - DEBUG=index-builder:*
  107. - WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
  108. - TYPES_JSON=types.json
  109. - DB_NAME=${INDEXER_DB_NAME}
  110. - DB_HOST=db
  111. depends_on:
  112. - db
  113. volumes:
  114. - ./types/augment/all/defs.json:/home/hydra/packages/hydra-indexer/types.json
  115. command: >
  116. sh -c 'yarn db:bootstrap && yarn start:prod'
  117. indexer-api-gateway:
  118. image: joystream/hydra-indexer-gateway:latest
  119. restart: unless-stopped
  120. env_file:
  121. # relative to working directory where docker-compose was run from
  122. - .env
  123. environment:
  124. - WARTHOG_STARTER_DB_DATABASE=${INDEXER_DB_NAME}
  125. - WARTHOG_STARTER_DB_HOST=db
  126. - WARTHOG_STARTER_DB_PASSWORD=${DB_PASS}
  127. - WARTHOG_STARTER_DB_PORT=${DB_PORT}
  128. - WARTHOG_STARTER_DB_USERNAME=${DB_USER}
  129. - WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
  130. - WARTHOG_APP_PORT=${WARTHOG_APP_PORT}
  131. - PORT=${WARTHOG_APP_PORT}
  132. - DEBUG=*
  133. ports:
  134. - "127.0.0.1:4000:4002"
  135. depends_on:
  136. - redis
  137. - db
  138. - indexer
  139. redis:
  140. image: redis:6.0-alpine
  141. restart: always
  142. ports:
  143. - "127.0.0.1:6379:6379"
  144. pioneer:
  145. image: joystream/pioneer
  146. build:
  147. context: .
  148. dockerfile: pioneer.Dockerfile
  149. ports:
  150. - "127.0.0.1:3000:80"