-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] 메인화면, 방송화면에서 닉네임을 받아오는 기능 구현 (#150)
* feat : 메인화면, 방송화면에서 닉네임 받아오도록 하기 * feat : 30초마다 스트리머 정보 갱신하는 기능 구현 * fix : front docker run할때 env파일 부여 * fix : ID 및 닉네임 수정 오류 수정 --------- Co-authored-by: ChoiSangwon <[email protected]>
- Loading branch information
1 parent
9263022
commit b87e687
Showing
9 changed files
with
263 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,56 +1,56 @@ | ||
name: auto deploy front | ||
|
||
on: | ||
push: | ||
branches: | ||
- dev | ||
push: | ||
branches: | ||
- dev | ||
|
||
jobs: | ||
docker_push_front: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
docker_push_front: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to NCP Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.NCP_CONTAINER_REGISTRY }} | ||
username: ${{ secrets.NCP_ACCESS_KEY }} | ||
password: ${{ secrets.NCP_SECRET_KEY }} | ||
- name: Login to NCP Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ${{ secrets.NCP_CONTAINER_REGISTRY }} | ||
username: ${{ secrets.NCP_ACCESS_KEY }} | ||
password: ${{ secrets.NCP_SECRET_KEY }} | ||
|
||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./client | ||
file: ./client/Dockerfile | ||
push: true | ||
tags: ${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
cache-from: type=registry,ref=${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
cache-to: type=inline | ||
- name: Build and Push Docker Image | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: ./client | ||
file: ./client/Dockerfile | ||
push: true | ||
tags: ${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
cache-from: type=registry,ref=${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
cache-to: type=inline | ||
|
||
docker_pull_front: | ||
name: Connect server ssh and pull frontend from container registry | ||
needs: docker_push_front | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: connect ssh | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.FRONT_HOST }} | ||
username: ${{ secrets.FRONT_USERNAME }} | ||
password: ${{ secrets.FRONT_PASSWORD }} | ||
port: ${{ secrets.FRONT_PORT }} | ||
script: | | ||
docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
docker stop $(docker ps -a -q) | ||
docker rm $(docker ps -a -q) | ||
docker run -d -p 80:80 -p 443:443 --name front ${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
docker image prune -f | ||
docker cp /etc/letsencrypt/archive/gbs-live.site/fullchain1.pem front:/ | ||
docker cp /etc/letsencrypt/archive/gbs-live.site/privkey1.pem front:/ | ||
docker cp default.conf front:/etc/nginx/conf.d/ | ||
docker exec front nginx -s reload | ||
docker_pull_front: | ||
name: Connect server ssh and pull frontend from container registry | ||
needs: docker_push_front | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: connect ssh | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.FRONT_HOST }} | ||
username: ${{ secrets.FRONT_USERNAME }} | ||
password: ${{ secrets.FRONT_PASSWORD }} | ||
port: ${{ secrets.FRONT_PORT }} | ||
script: | | ||
docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
docker stop $(docker ps -a -q) | ||
docker rm $(docker ps -a -q) | ||
docker run -d -p 80:80 -p 443:443 --name front --env-file ${{ secrets.ENV_PATH }} ${{ secrets.NCP_CONTAINER_REGISTRY }}/front | ||
docker image prune -f | ||
docker cp /etc/letsencrypt/archive/gbs-live.site/fullchain1.pem front:/ | ||
docker cp /etc/letsencrypt/archive/gbs-live.site/privkey1.pem front:/ | ||
docker cp default.conf front:/etc/nginx/conf.d/ | ||
docker exec front nginx -s reload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.