|
@@ -1,17 +1,150 @@
|
|
|
-# Compiles new joystream node image if local image not found,
|
|
|
-# and runs local development chain.
|
|
|
-# To prevent build run docker-compose with "--no-build" arg
|
|
|
-version: "3"
|
|
|
+# Compiles new joystream/node and joystream/apps images if local images not found
|
|
|
+# and runs a complete joystream development network
|
|
|
+# To prevent build of docker images run docker-compose with "--no-build" arg
|
|
|
+version: "3.4"
|
|
|
services:
|
|
|
joystream-node:
|
|
|
- image: joystream/node
|
|
|
+ image: joystream/node:latest
|
|
|
build:
|
|
|
# context is relative to the compose file
|
|
|
context: .
|
|
|
# dockerfile is relative to the context
|
|
|
dockerfile: joystream-node.Dockerfile
|
|
|
container_name: joystream-node
|
|
|
- command: --dev --alice --validator --unsafe-ws-external --rpc-cors=all --log runtime
|
|
|
+ volumes:
|
|
|
+ - /data
|
|
|
+ command: --dev --alice --validator --unsafe-ws-external --rpc-cors=all --log runtime --base-path /data
|
|
|
ports:
|
|
|
- - "9944:9944"
|
|
|
-
|
|
|
+ - "127.0.0.1:9944:9944"
|
|
|
+
|
|
|
+ ipfs:
|
|
|
+ image: ipfs/go-ipfs:latest
|
|
|
+ ports:
|
|
|
+ - '127.0.0.1:5001:5001'
|
|
|
+ - '127.0.0.1:8080:8080'
|
|
|
+ volumes:
|
|
|
+ - /data/ipfs
|
|
|
+ entrypoint: ''
|
|
|
+ command: |
|
|
|
+ /bin/sh -c "
|
|
|
+ set -e
|
|
|
+ /usr/local/bin/start_ipfs config profile apply lowpower
|
|
|
+ /usr/local/bin/start_ipfs config --json Gateway.PublicGateways '{\"localhost\": null }'
|
|
|
+ /sbin/tini -- /usr/local/bin/start_ipfs daemon --migrate=true
|
|
|
+ "
|
|
|
+
|
|
|
+ colossus:
|
|
|
+ image: joystream/apps
|
|
|
+ restart: on-failure
|
|
|
+ depends_on:
|
|
|
+ - "joystream-node"
|
|
|
+ - "ipfs"
|
|
|
+ build:
|
|
|
+ context: .
|
|
|
+ dockerfile: apps.Dockerfile
|
|
|
+ ports:
|
|
|
+ - '127.0.0.1:3001:3001'
|
|
|
+ command: colossus --dev --ws-provider ws://joystream-node:9944 --ipfs-host ipfs
|
|
|
+ environment:
|
|
|
+ - DEBUG=*
|
|
|
+
|
|
|
+ db:
|
|
|
+ image: postgres:12
|
|
|
+ restart: always
|
|
|
+ ports:
|
|
|
+ - "${DB_PORT}:5432"
|
|
|
+ volumes:
|
|
|
+ - /var/lib/postgresql/data
|
|
|
+ environment:
|
|
|
+ POSTGRES_USER: ${DB_USER}
|
|
|
+ POSTGRES_PASSWORD: ${DB_PASS}
|
|
|
+ POSTGRES_DB: ${DB_NAME}
|
|
|
+
|
|
|
+ graphql-server:
|
|
|
+ image: joystream/apps
|
|
|
+ restart: unless-stopped
|
|
|
+ build:
|
|
|
+ context: .
|
|
|
+ dockerfile: apps.Dockerfile
|
|
|
+ env_file:
|
|
|
+ # relative to working directory where docker-compose was run from
|
|
|
+ - .env
|
|
|
+ environment:
|
|
|
+ - DB_HOST=db
|
|
|
+ ports:
|
|
|
+ - "8080:${GRAPHQL_SERVER_PORT}"
|
|
|
+ depends_on:
|
|
|
+ - db
|
|
|
+ command: ["workspace", "query-node-root", "server:start:prod"]
|
|
|
+
|
|
|
+ processor:
|
|
|
+ image: joystream/apps
|
|
|
+ restart: unless-stopped
|
|
|
+ build:
|
|
|
+ context: .
|
|
|
+ dockerfile: apps.Dockerfile
|
|
|
+ env_file:
|
|
|
+ # relative to working directory where docker-compose was run from
|
|
|
+ - .env
|
|
|
+ environment:
|
|
|
+ - INDEXER_ENDPOINT_URL=http://indexer-api-gateway:4000/graphql
|
|
|
+ - DB_HOST=db
|
|
|
+ - TYPEORM_HOST=db
|
|
|
+ - DEBUG=index-builder:*
|
|
|
+ - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
|
|
|
+ depends_on:
|
|
|
+ - indexer-api-gateway
|
|
|
+ command: ["workspace", "query-node-root", "processor:start"]
|
|
|
+
|
|
|
+ indexer:
|
|
|
+ image: joystream/apps
|
|
|
+ restart: unless-stopped
|
|
|
+ build:
|
|
|
+ context: .
|
|
|
+ dockerfile: apps.Dockerfile
|
|
|
+ env_file:
|
|
|
+ # relative to working directory where docker-compose was run from
|
|
|
+ - .env
|
|
|
+ environment:
|
|
|
+ - TYPEORM_HOST=db
|
|
|
+ - INDEXER_WORKERS=5
|
|
|
+ - PROCESSOR_POLL_INTERVAL=1000 # refresh every second
|
|
|
+ - REDIS_URI=redis://redis:6379/0
|
|
|
+ - DEBUG=index-builder:*
|
|
|
+ - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
|
|
|
+ depends_on:
|
|
|
+ - db
|
|
|
+ command: ["workspace", "query-node-root", "indexer:start"]
|
|
|
+
|
|
|
+ indexer-api-gateway:
|
|
|
+ image: joystream/hydra-indexer-gateway:latest
|
|
|
+ restart: unless-stopped
|
|
|
+ environment:
|
|
|
+ - WARTHOG_STARTER_DB_DATABASE=${DB_NAME}
|
|
|
+ - WARTHOG_STARTER_DB_HOST=db
|
|
|
+ - WARTHOG_STARTER_DB_PASSWORD=${DB_PASS}
|
|
|
+ - WARTHOG_STARTER_DB_PORT=${DB_PORT}
|
|
|
+ - WARTHOG_STARTER_DB_USERNAME=${DB_USER}
|
|
|
+ - WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
|
|
|
+ - PORT=4000
|
|
|
+ ports:
|
|
|
+ - "4000:4000"
|
|
|
+ depends_on:
|
|
|
+ - redis
|
|
|
+ - db
|
|
|
+ - indexer
|
|
|
+
|
|
|
+ redis:
|
|
|
+ image: redis:6.0-alpine
|
|
|
+ restart: always
|
|
|
+ ports:
|
|
|
+ - "6379:6379"
|
|
|
+
|
|
|
+ pioneer:
|
|
|
+ image: joystream/apps
|
|
|
+ build:
|
|
|
+ context: .
|
|
|
+ dockerfile: apps.Dockerfile
|
|
|
+ ports:
|
|
|
+ - "127.0.0.1:3000:3000"
|
|
|
+ command: workspace pioneer start
|