40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
# Run Launch Kit Backend with Ganache and Mesh instances backing it.
|
|
version: '3'
|
|
services:
|
|
ganache:
|
|
image: "0xorg/ganache-cli:6.0.0"
|
|
ports:
|
|
- "8545:8545"
|
|
mesh:
|
|
image: 0xorg/mesh:0xV3
|
|
depends_on:
|
|
- ganache
|
|
environment:
|
|
ETHEREUM_RPC_URL: 'http://localhost:8545'
|
|
ETHEREUM_CHAIN_ID: '1337'
|
|
VERBOSITY: 5
|
|
BLOCK_POLLING_INTERVAL: '5s'
|
|
ports:
|
|
- '60557:60557'
|
|
network_mode: "host" # to connect to ganache
|
|
command: |
|
|
sh -c "waitForGanache () { until printf 'POST /\r\nContent-Length: 26\r\n\r\n{\"method\":\"net_listening\"}' | nc localhost 8545 | grep true; do continue; done }; waitForGanache && ./mesh"
|
|
launch-kit-backend:
|
|
image: "0xorg/launch-kit-backend:v3"
|
|
depends_on:
|
|
- ganache
|
|
- mesh
|
|
ports:
|
|
- "3000:3000"
|
|
network_mode: "host" # to connect to ganache
|
|
environment:
|
|
- CHAIN_ID=1337
|
|
- RPC_URL=http://localhost:8545
|
|
- WHITELIST_ALL_TOKENS=True
|
|
- FEE_RECIPIENT=0x0000000000000000000000000000000000000001
|
|
- MAKER_FEE_UNIT_AMOUNT=0
|
|
- TAKER_FEE_UNIT_AMOUNT=0
|
|
- MESH_ENDPOINT=ws://localhost:60557
|
|
command: |
|
|
sh -c "waitForMesh () { sleep 30; }; waitForMesh && node_modules/.bin/forever ts/lib/index.js"
|