docker-compose.yml 4.2 KB

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