Skip to content

Commit

Permalink
use docker network (#654)
Browse files Browse the repository at this point in the history
* use docker network

* cleanup
  • Loading branch information
fbielejec committed Oct 11, 2022
1 parent 7023caa commit 3f8e68a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/scripts/run_smartnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ docker run --rm -v $(pwd)/docker/data:/data --entrypoint "/bin/sh" -e RUST_LOG=d
# Get bootnode peer id
export BOOTNODE_PEER_ID=$(docker run --rm -v $(pwd)/docker/data:/data --entrypoint "/bin/sh" -e RUST_LOG=info "${NODE_IMAGE}" -c "aleph-node key inspect-node-key --file /data/$NODE_ID/p2p_secret")

docker network create node-network || true
docker-compose -f docker/smartnet-compose.yml up --remove-orphans

exit $?
6 changes: 3 additions & 3 deletions contracts/scripts/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ echo "Early Bird Special"

salt="0x4561726C79426972645370656369616C"
deploy_ticket_token EARLY_BIRD_SPECIAL_TICKET early_bird_special_ticket EBST $salt
deploy_game_token EARLY_BIRD_SPECIAL_TOKEN early_bird_special EBS $salt
deploy_game_token EARLY_BIRD_SPECIAL_TOKEN Ubik UBI $salt
deploy_marketplace EARLY_BIRD_SPECIAL_MARKETPLACE "$MARKETPLACE_CODE_HASH" early_bird_special "$salt" "$EARLY_BIRD_SPECIAL_TICKET" "$EARLY_BIRD_SPECIAL_TOKEN"
deploy_button_game EARLY_BIRD_SPECIAL EarlyBirdSpecial "$EARLY_BIRD_SPECIAL_TICKET" "$EARLY_BIRD_SPECIAL_TOKEN" "$EARLY_BIRD_SPECIAL_MARKETPLACE" "$salt"

Expand All @@ -229,7 +229,7 @@ echo "Back To The Future"

salt="0x4261636B546F546865467574757265"
deploy_ticket_token BACK_TO_THE_FUTURE_TICKET back_to_the_future_ticket BTFT $salt
deploy_game_token BACK_TO_THE_FUTURE_TOKEN back_to_the_future BTF $salt
deploy_game_token BACK_TO_THE_FUTURE_TOKEN Cyberiad CYB $salt
deploy_marketplace BACK_TO_THE_FUTURE_MARKETPLACE "$MARKETPLACE_CODE_HASH" back_to_the_future "$salt" "$BACK_TO_THE_FUTURE_TICKET" "$BACK_TO_THE_FUTURE_TOKEN"
deploy_button_game BACK_TO_THE_FUTURE BackToTheFuture "$BACK_TO_THE_FUTURE_TICKET" "$BACK_TO_THE_FUTURE_TOKEN" "$BACK_TO_THE_FUTURE_MARKETPLACE" "$salt"

Expand All @@ -240,7 +240,7 @@ echo "The Pressiah Cometh"

salt="0x7468655F70726573736961685F636F6D657468"
deploy_ticket_token THE_PRESSIAH_COMETH_TICKET the_pressiah_cometh_ticket TPCT $salt
deploy_game_token THE_PRESSIAH_COMETH_TOKEN the_pressiah_cometh TPC $salt
deploy_game_token THE_PRESSIAH_COMETH_TOKEN Lono LON $salt
deploy_marketplace THE_PRESSIAH_COMETH_MARKETPLACE "$MARKETPLACE_CODE_HASH" the_pressiah_cometh "$salt" "$THE_PRESSIAH_COMETH_TICKET" "$THE_PRESSIAH_COMETH_TOKEN"
deploy_button_game THE_PRESSIAH_COMETH ThePressiahCometh "$THE_PRESSIAH_COMETH_TICKET" "$THE_PRESSIAH_COMETH_TOKEN" "$THE_PRESSIAH_COMETH_MARKETPLACE" "$salt"

Expand Down
14 changes: 13 additions & 1 deletion docker/smartnet-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ services:
smartnode:
image: public.ecr.aws/p6e8q1z1/aleph-node:latest
container_name: smartnode
network_mode: host
environment:
- ALLOW_PRIVATE_IPV4=true
- BASE_PATH=/data/$NODE_ID
Expand All @@ -23,3 +22,16 @@ services:
- PUBLIC_ADDR=/ip4/127.0.0.1/tcp/30333
volumes:
- ./data/:/data/
expose:
- 30333
- 9933
- 9943
ports:
- 0.0.0.0:30333:30333
- 0.0.0.0:9933:9933
- 0.0.0.0:9943:9943

networks:
default:
external:
name: node-network

0 comments on commit 3f8e68a

Please sign in to comment.