Skip to content

Commit

Permalink
[DevOps] Fix docker deploy (#978)
Browse files Browse the repository at this point in the history
  • Loading branch information
yourmoonlight authored Oct 16, 2023
1 parent 37ddd70 commit bc2aa81
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
run: |
echo "$PRIVATE_KEY" > private_key.pem
chmod 600 private_key.pem
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST "cd /root/rooch && git pull origin main && bash scripts/deploy_examples.sh"
ssh -o StrictHostKeyChecking=no -i private_key.pem $USER@$HOST "cd /root/rooch && git pull origin main && docker pull ghcr.io/rooch-network/rooch:main && bash scripts/deploy_examples.sh"
6 changes: 3 additions & 3 deletions scripts/check_dev_deploy_status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ if [ "$STATUS" != "running" ]; then
if [ $? -eq 0 ]; then
echo "Container $CONTAINER_ID Successfully restarted."
echo "Redeploy the examples"
for dir in examples/*/; do
for dir in /root/rooch/examples/*/; do
dir=${dir%*/}
name_addr=$(basename $dir)
echo $name_addr
rooch move build -p "$dir" --named-addresses rooch_examples=default,$name_addr=default
rooch move publish --named-addresses rooch_examples=default,$name_addr=default -p examples/$name_addr/
docker run -v /root:/root $CONTAINER_ID move build -p "$dir" --named-addresses rooch_examples=default,$name_addr=default
docker run -v /root:/root $CONTAINER_ID move publish -p "$dir" --named-addresses rooch_examples=default,$name_addr=default
done
else
echo "Container $CONTAINER_ID Startup failed, please check the reason."
Expand Down
6 changes: 3 additions & 3 deletions scripts/deploy_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# Copyright (c) RoochNetwork
# SPDX-License-Identifier: Apache-2.0

for dir in examples/*/;
for dir in /root/rooch/examples/*/;
do dir=${dir%*/};
name_addr=$(basename $dir);
echo $name_addr
rooch move build -p "$dir" --named-addresses rooch_examples=default,$name_addr=default;
rooch move publish --named-addresses rooch_examples=default,$name_addr=default -p examples/$name_addr/;
docker run -v /root:/root ghcr.io/rooch-network/rooch:main move build -p "$dir" --named-addresses rooch_examples=default,$name_addr=default;
docker run -v /root:/root ghcr.io/rooch-network/rooch:main move publish -p "$dir" --named-addresses rooch_examples=default,$name_addr=default ;
done

0 comments on commit bc2aa81

Please sign in to comment.