Skip to content

Commit

Permalink
Merge branch 'master' of github.com:SoftVarE-Group/uvl-playground
Browse files Browse the repository at this point in the history
  • Loading branch information
st-vi committed Nov 3, 2023
2 parents f291fc3 + a8007e8 commit 696ed89
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/playground_deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ env:
HOSTNAME: 590c9306-8ced-48f6-85f2-bb8caa1bfd52.ul.bw-cloud-instance.org
USERNAME: ubuntu
WORKDIR: /home/ubuntu
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}

on:
push:
Expand Down Expand Up @@ -36,20 +37,11 @@ jobs:
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H $HOSTNAME >> ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Copy directories to remote server
- name: Copy all necessary files to remote server
run: |
scp -r ./WebSocketLanguageServer $USERNAME@$HOSTNAME:$WORKDIR
scp -r ./WebSocketClient/UVLPlayground/dist $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Copy Dockerfile to remote server
run: scp -r ./WebSocketClient/UVLPlayground/Dockerfile $USERNAME@$HOSTNAME:$WORKDIR/WebSocketClient/UVLPlayground
- name: Copy Compose file
run: scp -r ./docker-compose.yaml $USERNAME@$HOSTNAME:$WORKDIR
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'
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: ssh -i ~/.ssh/id_rsa $USERNAME@$HOSTNAME 'pwd && docker compose up --build -d'
2 changes: 2 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ services:
context: ./WebSocketLanguageServer
dockerfile: Dockerfile
hostname: language-server
restart: on-failure
ports:
- "30000:30000"

web-server:
build:
context: ./WebSocketClient/UVLPlayground
dockerfile: Dockerfile
restart: on-failure
ports:
- "8000:80"

0 comments on commit 696ed89

Please sign in to comment.