diff --git a/README.md b/README.md index 45b8a69f..0e2e0579 100644 --- a/README.md +++ b/README.md @@ -61,9 +61,14 @@ docker-compose -p kusama -f docker-compose.kusama-full.yml up --build ## Links to applications * Polkascan Explorer GUI: http://127.0.0.1:8080 +* Monitor harvester progress: http://127.0.0.1:8080/kusama/harvester/admin * Harvester Task Monitor: http://127.0.0.1:5555 * Polkadot JS Apps: http://127.0.0.1:8081 +## Other networks + +* Polkadot CC1: Use `docker-compose.polkadot-cc1-quick.yml` and `docker-compose.polkadot-cc1-full.yml` + ## Cleanup Docker Use the following commands with caution to cleanup your Docker environment. diff --git a/docker-compose.kusama-full.yml b/docker-compose.kusama-full.yml index 89a716de..76e5c799 100644 --- a/docker-compose.kusama-full.yml +++ b/docker-compose.kusama-full.yml @@ -121,7 +121,7 @@ services: CHAIN_TYPE: relay NETWORK_TOKEN_SYMBOL: KSM NETWORK_TOKEN_DECIMALS: 12 - NETWORK_COLOR_CODE: d32e79 + NETWORK_COLOR_CODE: 000000 API_URL: http://127.0.0.1:8080/api/v1 ports: - '8080:80' diff --git a/docker-compose.kusama-quick.yml b/docker-compose.kusama-quick.yml index 18664293..1dd4d824 100644 --- a/docker-compose.kusama-quick.yml +++ b/docker-compose.kusama-quick.yml @@ -13,7 +13,7 @@ services: CHAIN_TYPE: relay NETWORK_TOKEN_SYMBOL: KSM NETWORK_TOKEN_DECIMALS: 12 - NETWORK_COLOR_CODE: d32e79 + NETWORK_COLOR_CODE: 000000 NGINX_CONF: nginx/polkascan-gui.conf API_URL: https://api-01.polkascan.io/kusama/api/v1 ports: diff --git a/docker-compose.polkadot-cc1-full.yml b/docker-compose.polkadot-cc1-full.yml new file mode 100644 index 00000000..807d01d7 --- /dev/null +++ b/docker-compose.polkadot-cc1-full.yml @@ -0,0 +1,143 @@ +version: '3.2' + +services: + + explorer-api: + build: explorer-api/. + image: polkascan/pre-explorer-api:latest + hostname: explorer-api + volumes: + - './explorer-api:/usr/src/app' + command: ./start.sh + environment: + - PYTHONPATH=/usr/src/app + - ENVIRONMENT=prod + - DB_HOST=mysql + - DB_PORT=3306 + - DB_USERNAME=root + - DB_PASSWORD=root + - DB_NAME=polkascan + - SUBSTRATE_RPC_URL=http://substrate-node:9933/ + - SUBSTRATE_ADDRESS_TYPE=0 + - TYPE_REGISTRY=polkadot + - SUBSTRATE_METADATA_VERSION=9 + - SUBSTRATE_STORAGE_BALANCE=Account + - SUBSTRATE_STORAGE_INDICES=Accounts + depends_on: + - mysql + - substrate-node + + harvester-api: + build: harvester/. + image: polkascan/pre-harvester:latest + hostname: harvester-api + volumes: + - './harvester:/usr/src/app' + command: ./start.sh + environment: &env + - CELERY_BROKER=redis://redis:6379/0 + - CELERY_BACKEND=redis://redis:6379/0 + - PYTHONPATH=/usr/src/app + - ENVIRONMENT=prod + - DB_HOST=mysql + - DB_PORT=3306 + - DB_USERNAME=root + - DB_PASSWORD=root + - DB_NAME=polkascan + - SUBSTRATE_RPC_URL=http://substrate-node:9933/ + - TYPE_REGISTRY=polkadot + - SUBSTRATE_ADDRESS_TYPE=0 + - SUBSTRATE_METADATA_VERSION=9 + - NEW_SESSION_EVENT_HANDLER=True + - SUBSTRATE_STORAGE_BALANCE=Account + - SUBSTRATE_STORAGE_INDICES=Accounts + + depends_on: + - redis + - mysql + - substrate-node + + harvester-worker: + build: harvester/. + image: polkascan/pre-harvester:latest + volumes: + - './harvester:/usr/src/app' + command: celery -A app.tasks worker --loglevel=INFO + environment: *env + depends_on: + - redis + - mysql + + harvester-beat: + build: harvester/. + image: polkascan/pre-harvester:latest + volumes: + - './harvester:/usr/src/app' + - '/usr/src/app/data' + command: celery -A app.tasks beat --loglevel=INFO --schedule="data/celerybeat-schedule" --pidfile="data/celerybeat.pid" + environment: *env + depends_on: + - redis + + harvester-monitor: + build: harvester/. + image: polkascan/pre-harvester:latest + ports: + - '5555:5555' + command: flower -A app.tasks --port=5555 --broker=redis://redis:6379/0 + depends_on: + - redis + + redis: + image: redis:3.2.11 + hostname: redis + + mysql: + image: mysql:latest + hostname: mysql + volumes: + - 'db-data:/var/lib/mysql' + ports: + - '33061:3306' + environment: + - MYSQL_ROOT_PASSWORD=root + - MYSQL_DATABASE=polkascan + + substrate-node: + image: polkasource/substrate-client:polkadot-latest + hostname: substrate-node + volumes: + - 'substrate-data:/data' + ports: + - '30333:30333' + - '9933:9933' + - '9944:9944' + command: --chain=polkadot --db-cache=2048 --wasm-execution=Compiled --rpc-external --rpc-cors=all --ws-external --rpc-methods=Unsafe --pruning=archive + + explorer-gui: + image: polkascan/pre-explorer-gui:latest + build: + context: explorer-gui/. + args: + NETWORK_NAME: Polkadot CC1 + NETWORK_ID: polkadot-cc1 + NETWORK_TYPE: pre + CHAIN_TYPE: relay + NETWORK_TOKEN_SYMBOL: DOT + NETWORK_TOKEN_DECIMALS: 12 + NETWORK_COLOR_CODE: e6007a + API_URL: http://127.0.0.1:8080/api/v1 + ports: + - '8080:80' + depends_on: + - harvester-api + - explorer-api + + polkadot-ui: + image: polkasource/substrate-ui:polkadot-latest + ports: + - '8081:80' + +volumes: + db-data: + substrate-data: diff --git a/docker-compose.polkadot-cc1-quick.yml b/docker-compose.polkadot-cc1-quick.yml new file mode 100644 index 00000000..24ca535d --- /dev/null +++ b/docker-compose.polkadot-cc1-quick.yml @@ -0,0 +1,25 @@ +version: '3.2' + +services: + + explorer-gui: + image: polkascan/pre-explorer-gui:latest + build: + context: explorer-gui/. + args: + NETWORK_NAME: Polkadot CC1 + NETWORK_ID: polkadot-cc1 + NETWORK_TYPE: pre + CHAIN_TYPE: relay + NETWORK_TOKEN_SYMBOL: DOT + NETWORK_TOKEN_DECIMALS: 12 + NETWORK_COLOR_CODE: e6007a + NGINX_CONF: nginx/polkascan-gui.conf + API_URL: https://api-01.polkascan.io/polkadot/api/v1 + ports: + - '8080:80' + + polkadot-ui: + image: polkasource/substrate-ui:polkadot-latest + ports: + - '8081:80'