mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-01-23 02:34:42 +00:00
Add ssh user option
This commit is contained in:
parent
a7eb6cf9c3
commit
e770f1c77e
2 changed files with 4 additions and 2 deletions
|
|
@ -3,3 +3,4 @@ DO_ADDRESS_LIST="cloud-gaming cloud-gaming-eu cloud-gaming-usw"
|
|||
IP_LIST=47.244.229.182
|
||||
SPLIT_HOSTS=1
|
||||
WORKERS=${WORKERS:-5}
|
||||
USER=root
|
||||
|
|
|
|||
5
.github/workflows/cd/deploy-app.sh
vendored
5
.github/workflows/cd/deploy-app.sh
vendored
|
|
@ -65,6 +65,7 @@ DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG:-latest}
|
|||
echo "Docker tag:$DOCKER_IMAGE_TAG"
|
||||
# the total number of worker replicas to deploy
|
||||
WORKERS=${WORKERS:-5}
|
||||
USER=${USER:-root}
|
||||
|
||||
compose_src=$(cat $LOCAL_WORK_DIR/docker-compose.yml)
|
||||
|
||||
|
|
@ -86,7 +87,7 @@ function remote_sudo_run_once() {
|
|||
f=$2/run-once.sh
|
||||
if [[ -e "$f" ]]; then
|
||||
echo >&2 "execute remotely $f:"$'\n'"$(cat $f)"$'\n'
|
||||
ssh ubuntu@$1 -t $3 sudo sh < $f
|
||||
ssh $USER@$1 -t $3 sudo sh < $f
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
@ -201,7 +202,7 @@ for ip in $IP_LIST; do
|
|||
|
||||
echo "Update the remote host"
|
||||
|
||||
ssh ubuntu@$ip ${ssh_i:-} "\
|
||||
ssh $USER@$ip ${ssh_i:-} "\
|
||||
mkdir -p $REMOTE_WORK_DIR; \
|
||||
cd $REMOTE_WORK_DIR; \
|
||||
echo '$compose_src' > ./docker-compose.yml; \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue