From 6b48c9b991dbbfe71038e864e21217cd79812c49 Mon Sep 17 00:00:00 2001 From: Stefan <76208574+st-vi@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:41:09 +0100 Subject: [PATCH 1/5] Update playground_deployment.yml --- .github/workflows/playground_deployment.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playground_deployment.yml b/.github/workflows/playground_deployment.yml index fb87828..8227993 100644 --- a/.github/workflows/playground_deployment.yml +++ b/.github/workflows/playground_deployment.yml @@ -5,6 +5,7 @@ env: USERNAME: ubuntu WORKDIR: /home/ubuntu SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} + EMAIL: uvl-playground@trash-mail.com on: push: @@ -31,8 +32,11 @@ jobs: - name: Set hostname for WebSocketLanguageServer run: | sed -i "s/languageServerHostName: .*/languageServerHostName: \"$HOSTNAME\",/" ./WebSocketClient/UVLPlayground/src/config.ts - sed -i "s/port: .*/port: 8010,/" ./WebSocketClient/UVLPlayground/src/config.ts sed -i "s/debug: .*/debug: false,/" ./WebSocketClient/UVLPlayground/src/config.ts + - name: Set hostname mail for docker compose + run: | + sed -i 's/^HOSTNAME=.*/HOSTNAME=$HOSTNAME/' ./env + sed -i 's/^EMAIL=.*/EMAIL=$EMAIL/' ./env - name: Build working-directory: WebSocketClient/UVLPlayground run: npm run build @@ -51,4 +55,4 @@ jobs: scp -r ./WebSocketClient/UVLPlayground/Dockerfile $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground scp -r ./docker-compose.yaml $USERNAME@$HOSTNAME:$WORKDIR - name: Build and run containers - run: ssh -i ~/.ssh/id_rsa $USERNAME@$HOSTNAME 'pwd && docker compose up --build -d' \ No newline at end of file + run: ssh -i ~/.ssh/id_rsa $USERNAME@$HOSTNAME 'pwd && docker compose up --build -d' From 55ccda94b3da7eeb0000eecab46f1dfcb436bd94 Mon Sep 17 00:00:00 2001 From: Stefan <76208574+st-vi@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:42:41 +0100 Subject: [PATCH 2/5] fix(deplyment): wrong path for env file --- .github/workflows/playground_deployment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playground_deployment.yml b/.github/workflows/playground_deployment.yml index 8227993..d85a26a 100644 --- a/.github/workflows/playground_deployment.yml +++ b/.github/workflows/playground_deployment.yml @@ -35,8 +35,8 @@ jobs: sed -i "s/debug: .*/debug: false,/" ./WebSocketClient/UVLPlayground/src/config.ts - name: Set hostname mail for docker compose run: | - sed -i 's/^HOSTNAME=.*/HOSTNAME=$HOSTNAME/' ./env - sed -i 's/^EMAIL=.*/EMAIL=$EMAIL/' ./env + sed -i 's/^HOSTNAME=.*/HOSTNAME=$HOSTNAME/' ./.env + sed -i 's/^EMAIL=.*/EMAIL=$EMAIL/' ./.env - name: Build working-directory: WebSocketClient/UVLPlayground run: npm run build From 6096f9da386abfe51f5d602b541881865e4fa760 Mon Sep 17 00:00:00 2001 From: Stefan <76208574+st-vi@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:48:26 +0100 Subject: [PATCH 3/5] fix(deployment): create env file --- .github/workflows/playground_deployment.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/playground_deployment.yml b/.github/workflows/playground_deployment.yml index d85a26a..4c0beb7 100644 --- a/.github/workflows/playground_deployment.yml +++ b/.github/workflows/playground_deployment.yml @@ -35,8 +35,8 @@ jobs: sed -i "s/debug: .*/debug: false,/" ./WebSocketClient/UVLPlayground/src/config.ts - name: Set hostname mail for docker compose run: | - sed -i 's/^HOSTNAME=.*/HOSTNAME=$HOSTNAME/' ./.env - sed -i 's/^EMAIL=.*/EMAIL=$EMAIL/' ./.env + echo "HOSTNAME=$HOSTNAME" > .env + echo "EMAIL=$EMAIL" >> .env - name: Build working-directory: WebSocketClient/UVLPlayground run: npm run build @@ -54,5 +54,6 @@ jobs: scp -r ./WebSocketClient/UVLPlayground/dist $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground scp -r ./WebSocketClient/UVLPlayground/Dockerfile $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground scp -r ./docker-compose.yaml $USERNAME@$HOSTNAME:$WORKDIR + scp .r ./.env $USERNAME@$HOSTNAME:$WORKDIR - name: Build and run containers run: ssh -i ~/.ssh/id_rsa $USERNAME@$HOSTNAME 'pwd && docker compose up --build -d' From 14cbd5f0a8276c753f301f6b093409c57eff0323 Mon Sep 17 00:00:00 2001 From: Stefan <76208574+st-vi@users.noreply.github.com> Date: Fri, 10 Nov 2023 12:50:27 +0100 Subject: [PATCH 4/5] Update playground_deployment.yml --- .github/workflows/playground_deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playground_deployment.yml b/.github/workflows/playground_deployment.yml index 4c0beb7..9f70b80 100644 --- a/.github/workflows/playground_deployment.yml +++ b/.github/workflows/playground_deployment.yml @@ -54,6 +54,6 @@ jobs: scp -r ./WebSocketClient/UVLPlayground/dist $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground scp -r ./WebSocketClient/UVLPlayground/Dockerfile $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground scp -r ./docker-compose.yaml $USERNAME@$HOSTNAME:$WORKDIR - scp .r ./.env $USERNAME@$HOSTNAME:$WORKDIR + scp -r ./.env $USERNAME@$HOSTNAME:$WORKDIR - name: Build and run containers run: ssh -i ~/.ssh/id_rsa $USERNAME@$HOSTNAME 'pwd && docker compose up --build -d' From e8ee1221ed2a3bd9fb3531cb8a3871b163a00cfa Mon Sep 17 00:00:00 2001 From: Stefan <76208574+st-vi@users.noreply.github.com> Date: Fri, 10 Nov 2023 13:13:14 +0100 Subject: [PATCH 5/5] Update playground_deployment.yml --- .github/workflows/playground_deployment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/playground_deployment.yml b/.github/workflows/playground_deployment.yml index 9f70b80..2e838e6 100644 --- a/.github/workflows/playground_deployment.yml +++ b/.github/workflows/playground_deployment.yml @@ -1,7 +1,7 @@ name: Deploy UVL Playground env: - HOSTNAME: 590c9306-8ced-48f6-85f2-bb8caa1bfd52.ul.bw-cloud-instance.org + HOSTNAME: 9d29add1-1c00-4f93-a237-f66f8dab4353.ul.bw-cloud-instance.org USERNAME: ubuntu WORKDIR: /home/ubuntu SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}