123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214 |
- # 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:latest
- build:
- # context is relative to the compose file
- context: .
- # dockerfile is relative to the context
- dockerfile: joystream-node.Dockerfile
- container_name: joystream-node
- volumes:
- - /data
- command: --dev --alice --validator --unsafe-ws-external --unsafe-rpc-external --rpc-methods Unsafe --rpc-cors=all --log runtime --base-path /data
- ports:
- - '127.0.0.1:9944:9944'
- - '127.0.0.1:9933:9933'
- colossus:
- image: joystream/colossus:latest
- restart: on-failure
- build:
- context: .
- dockerfile: colossus.Dockerfile
- depends_on:
- - graphql-server
- volumes:
- - /data
- - /keystore
- ports:
- - '127.0.0.1:3333:${COLOSSUS_PORT}'
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- distributor-node:
- image: joystream/distributor-node
- restart: on-failure
- build:
- context: .
- dockerfile: distributor-node.Dockerfile
- depends_on:
- - graphql-server
- volumes:
- - /data
- - /cache
- ports:
- - 127.0.0.1:3334:3334
- # Node configuration can be overriden via env, for exampe:
- environment:
- # JOYSTREAM_DISTRIBUTOR__ID: node-id
- JOYSTREAM_DISTRIBUTOR__ENDPOINTS__QUERY_NODE: http://${GRAPHQL_SERVER_HOST}:${GRAPHQL_SERVER_PORT}/graphql
- # JOYSTREAM_DISTRIBUTOR__ENDPOINTS__SUBSTRATE_NODE: sn-endpoint
- # JOYSTREAM_DISTRIBUTOR__ENDPOINTS__ELASTIC_SEARCH: es-endpoint
- # JOYSTREAM_DISTRIBUTOR__DIRECTORIES__DATA: data-dir
- # JOYSTREAM_DISTRIBUTOR__DIRECTORIES__CACHE: cache-dir
- # JOYSTREAM_DISTRIBUTOR__DIRECTORIES__LOGS: logs-dir
- # JOYSTREAM_DISTRIBUTOR__LOG__CONSOLE: "off"
- # JOYSTREAM_DISTRIBUTOR__LOG__FILE: "off"
- # JOYSTREAM_DISTRIBUTOR__LOG__ELASTIC: "off"
- # JOYSTREAM_DISTRIBUTOR__LIMITS__STORAGE: 50G
- # JOYSTREAM_DISTRIBUTOR__PORT: 1234
- # JOYSTREAM_DISTRIBUTOR__KEYS: "[\"//Bob\"]"
- # JOYSTREAM_DISTRIBUTOR__BUCKETS: "[1,2]"
- # JOYSTREAM_DISTRIBUTOR__WORKER_ID: 0
- command: ['start']
- db:
- image: postgres:12
- restart: always
- ports:
- - '127.0.0.1:${DB_PORT}:5432'
- volumes:
- - /var/lib/postgresql/data
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- environment:
- POSTGRES_USER: ${DB_USER}
- POSTGRES_PASSWORD: ${DB_PASS}
- POSTGRES_DB: ${INDEXER_DB_NAME}
- graphql-server:
- image: joystream/apps
- restart: unless-stopped
- build:
- context: .
- dockerfile: apps.Dockerfile
- args:
- - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- ports:
- - '127.0.0.1:8081:${GRAPHQL_SERVER_PORT}'
- depends_on:
- - db
- command: ['workspace', 'query-node-root', 'query-node:start:prod']
- graphql-server-mnt:
- image: node:14
- restart: unless-stopped
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- ports:
- - '127.0.0.1:8081:${GRAPHQL_SERVER_PORT}'
- depends_on:
- - db
- volumes:
- - type: bind
- source: .
- target: /joystream
- working_dir: /joystream
- command: ['yarn', 'workspace', 'query-node-root', 'query-node:start:prod']
- processor:
- image: joystream/apps
- restart: unless-stopped
- build:
- context: .
- dockerfile: apps.Dockerfile
- args:
- - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- environment:
- - INDEXER_ENDPOINT_URL=http://hydra-indexer-gateway:${WARTHOG_APP_PORT}/graphql
- - TYPEORM_HOST=${DB_HOST}
- - TYPEORM_DATABASE=${DB_NAME}
- - WS_PROVIDER_ENDPOINT_URI=${WS_PROVIDER_ENDPOINT_URI}
- volumes:
- - ./types/augment/all/defs.json:/joystream/query-node/mappings/lib/generated/types/typedefs.json
- depends_on:
- - hydra-indexer-gateway
- command: ['workspace', 'query-node-root', 'processor:start']
- processor-mnt:
- image: node:14
- restart: unless-stopped
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- environment:
- - INDEXER_ENDPOINT_URL=http://hydra-indexer-gateway:${WARTHOG_APP_PORT}/graphql
- - TYPEORM_HOST=${DB_HOST}
- - TYPEORM_DATABASE=${DB_NAME}
- depends_on:
- - hydra-indexer-gateway
- volumes:
- - type: bind
- source: .
- target: /joystream
- working_dir: /joystream
- command: ['yarn', 'workspace', 'query-node-root', 'processor:start']
- indexer:
- image: joystream/hydra-indexer:3.0.0
- restart: unless-stopped
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- environment:
- - DB_NAME=${INDEXER_DB_NAME}
- - INDEXER_WORKERS=5
- - REDIS_URI=redis://redis:6379/0
- - TYPES_JSON=types.json
- depends_on:
- - db
- - redis
- volumes:
- - ./types/augment/all/defs.json:/home/hydra/packages/hydra-indexer/types.json
- command: >
- sh -c "yarn db:bootstrap && yarn start:prod"
- hydra-indexer-gateway:
- image: joystream/hydra-indexer-gateway:3.0.0
- restart: unless-stopped
- env_file:
- # relative to working directory where docker-compose was run from
- - .env
- environment:
- - WARTHOG_STARTER_DB_DATABASE=${INDEXER_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
- - WARTHOG_APP_PORT=${WARTHOG_APP_PORT}
- - PORT=${WARTHOG_APP_PORT}
- - DEBUG=*
- ports:
- - '127.0.0.1:4000:${WARTHOG_APP_PORT}'
- depends_on:
- - redis
- - db
- - indexer
- redis:
- image: redis:6.0-alpine
- restart: always
- ports:
- - '127.0.0.1:6379:6379'
- pioneer:
- image: joystream/pioneer
- build:
- context: .
- dockerfile: pioneer.Dockerfile
- ports:
- - '127.0.0.1:3000:80'
|