From 6d61d4e8414ef277c6dfc01481d2009dbbb743e8 Mon Sep 17 00:00:00 2001 From: hyunkoes Date: Tue, 3 Sep 2024 14:01:56 +0900 Subject: [PATCH 1/2] ci cd workflows --- .github/workflows/deploy-single-server.yml | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/deploy-single-server.yml diff --git a/.github/workflows/deploy-single-server.yml b/.github/workflows/deploy-single-server.yml new file mode 100644 index 0000000..bcb9f85 --- /dev/null +++ b/.github/workflows/deploy-single-server.yml @@ -0,0 +1,53 @@ +name: Deploy to Single Server + +on: + push: + branches: + - 'main' + workflow_dispatch: + +env: + IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/cicd-practice + IMAGE_TAG: latest + CONTAINER_NAME: ${{ secrets.DOCKERHUB_USERNAME }}-cicd + PORT: 40000 # <- 변경 요망 + +jobs: + cicd: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + - + name: Login to DockerHub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build Container Image + uses: docker/build-push-action@v4 + with: + context: . + file: ./Dockerfile + platforms: linux/amd64 + push: true + tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + + - + name: SSH Remote Commands + uses: appleboy/ssh-action@v1.0.3 + with: + host: server.geunsam2.xyz + username: cicduser + password: ${{ secrets.SSH_PASSWORD }} + port: 22 + timeout: 40s + script: | + docker pull ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} + docker rm -f ${{ env.CONTAINER_NAME }} + docker run -d -p ${{ env.PORT }}:3000 --name ${{ env.CONTAINER_NAME }} ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \ No newline at end of file From 062a11320f9ab7214c23fbce78ab557c32903787 Mon Sep 17 00:00:00 2001 From: hyunkoes Date: Tue, 3 Sep 2024 16:39:59 +0900 Subject: [PATCH 2/2] =?UTF-8?q?16=5F=EC=B5=9C=ED=98=84=EC=84=9D=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy-single-server.yml | 53 ---------------------- pages/members/16_ChoiHyunSeok.md | 35 ++++++++++++++ 2 files changed, 35 insertions(+), 53 deletions(-) delete mode 100644 .github/workflows/deploy-single-server.yml create mode 100644 pages/members/16_ChoiHyunSeok.md diff --git a/.github/workflows/deploy-single-server.yml b/.github/workflows/deploy-single-server.yml deleted file mode 100644 index bcb9f85..0000000 --- a/.github/workflows/deploy-single-server.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Deploy to Single Server - -on: - push: - branches: - - 'main' - workflow_dispatch: - -env: - IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/cicd-practice - IMAGE_TAG: latest - CONTAINER_NAME: ${{ secrets.DOCKERHUB_USERNAME }}-cicd - PORT: 40000 # <- 변경 요망 - -jobs: - cicd: - runs-on: ubuntu-latest - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Build Container Image - uses: docker/build-push-action@v4 - with: - context: . - file: ./Dockerfile - platforms: linux/amd64 - push: true - tags: ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - - - - name: SSH Remote Commands - uses: appleboy/ssh-action@v1.0.3 - with: - host: server.geunsam2.xyz - username: cicduser - password: ${{ secrets.SSH_PASSWORD }} - port: 22 - timeout: 40s - script: | - docker pull ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} - docker rm -f ${{ env.CONTAINER_NAME }} - docker run -d -p ${{ env.PORT }}:3000 --name ${{ env.CONTAINER_NAME }} ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} \ No newline at end of file diff --git a/pages/members/16_ChoiHyunSeok.md b/pages/members/16_ChoiHyunSeok.md new file mode 100644 index 0000000..c312299 --- /dev/null +++ b/pages/members/16_ChoiHyunSeok.md @@ -0,0 +1,35 @@ +# 최현석 + +## 🥸 인적사항 + +- name : 최현석 +- github : [hyunkoes](https://github.com/hyunkoes) +- age : 25 +- blog : X +- 회사 : 현대오토에버 +- 부서 : 클라우드개발 + +## 🥕 좋아하는 것 + +- 헬스 +- 축구 +- 술 + +## 🐿 아무말 + +아직 5개월차 주주주주니어 + +k8s opensource에 관심이 많아요. + +저는 특히 아래 언어들을 좋아하고 많이 사용해요. + +![Go](https://img.shields.io/badge/go-%2300ADD8.svg?style=for-the-badge&logo=go&logoColor=white) +![ShellScript](https://img.shields.io/badge/Shell_Script-6E6B6A?style=for-the-badge&logo=gnu-bash&logoColor=white) + +```python +import you + +you.need('Coffee!') +``` + +---