diff --git a/README.md b/README.md index 9e0d62d0..7c31f5a5 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ Run app/contract-migration to deploy contracts RUN_MASK=3 docker-compose up contract-migration ``` +View container status +``` +docker ps --filter network=cic-network --format "table {{.ID}}\t{{.Names}}\t{{.Status}}" --all +``` + stop cluster ``` docker-compose down diff --git a/apps/contract-migration/docker/init_readyz.sh b/apps/contract-migration/docker/init_readyz.sh index dd423d66..bea87301 100755 --- a/apps/contract-migration/docker/init_readyz.sh +++ b/apps/contract-migration/docker/init_readyz.sh @@ -11,10 +11,12 @@ jq --arg CIC_REGISTRY_ADDRESS "$CIC_REGISTRY_ADDRESS" \ --arg CIC_TRUST_ADDRESS "$CIC_TRUST_ADDRESS" \ --arg CIC_DEFAULT_TOKEN_SYMBOL "$CIC_DEFAULT_TOKEN_SYMBOL"\ --arg TOKEN_NAME "$TOKEN_NAME"\ + --arg RUN_MASK "$RUN_MASK" \ -n '{"CIC_REGISTRY_ADDRESS": $CIC_REGISTRY_ADDRESS, "CIC_TRUST_ADDRESS": $CIC_TRUST_ADDRESS, "CIC_DEFAULT_TOKEN_SYMBOL": $CIC_DEFAULT_TOKEN_SYMBOL, - "TOKEN_NAME": $TOKEN_NAME}' > $DEV_DATA_DIR/health/readyz + "TOKEN_NAME": $TOKEN_NAME, + "RUN_MASK": $RUN_MASK}' > $DEV_DATA_DIR/health/readyz cd $DEV_DATA_DIR/health diff --git a/apps/contract-migration/health/readyz b/apps/contract-migration/health/readyz deleted file mode 100644 index ac51f305..00000000 --- a/apps/contract-migration/health/readyz +++ /dev/null @@ -1,6 +0,0 @@ -{ - "CIC_REGISTRY_ADDRESS": "", - "CIC_TRUST_ADDRESS": "0xEb3907eCad74a0013c259D5874AE7f22DcBcC95C", - "CIC_DEFAULT_TOKEN_SYMBOL": "GFT", - "TOKEN_NAME": "Giftable Token" -} diff --git a/apps/contract-migration/run_job.sh b/apps/contract-migration/run_job.sh index fe4a0acd..077192fb 100755 --- a/apps/contract-migration/run_job.sh +++ b/apps/contract-migration/run_job.sh @@ -12,6 +12,7 @@ if [[ $((RUN_MASK & 1)) -eq 1 ]] then >&2 echo -e "\033[;96mRUNNING\033[;39m RUN_MASK 1 - contract deployment" ./reset.sh + ./docker/init_readyz.sh 2>&1 & if [ $? -ne "0" ]; then >&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 1 - contract deployment" exit 1; @@ -23,6 +24,7 @@ if [[ $((RUN_MASK & 2)) -eq 2 ]] then >&2 echo -e "\033[;96mRUNNING\033[;39m RUN_MASK 2 - custodial service initialization" ./seed_cic_eth.sh + ./docker/init_readyz.sh if [ $? -ne "0" ]; then >&2 echo -e "\033[;31mFAILED\033[;39m RUN_MASK 2 - custodial service initialization" exit 1; @@ -30,5 +32,4 @@ then >&2 echo -e "\033[;32mSUCCEEDED\033[;39m RUN_MASK 2 - custodial service initialization" fi -./docker/init_readyz.sh diff --git a/docker-compose.yml b/docker-compose.yml index 80986358..d7160b2b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -109,7 +109,6 @@ services: TOKEN_DEMURRAGE_LEVEL: $TOKEN_DEMURRAGE_LEVEL TOKEN_SINK_ADDRESS: $TOKEN_SINK_ADDRESS SIGNER_PROVIDER: ${SIGNER_SOCKET_PATH:-http://cic-eth-signer:8000} - restart: on-failure command: ["./run_job.sh"] #command: bash -c "while true; do sleep 1; done" # Infinite loop to keep container live doing nothing depends_on: @@ -121,7 +120,6 @@ services: - contract-config:/tmp/cic/config - ./apps/contract-migration:/root - data-seeding: image: registry.gitlab.com/grassrootseconomics/cic-internal-integration/data-seeding:${TAG:-latest} build: