From 53cc0b7ca8539e9e50905b9be1a3353a78adc028 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 22:27:20 +0900 Subject: [PATCH 01/25] =?UTF-8?q?chore:=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=8A=B8=EB=A6=AC?= =?UTF-8?q?=EA=B1=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index fbba204c6..9e87a70dc 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -3,6 +3,8 @@ name: develop Build And Deploy on: push: branches: [ "develop" ] + pull_request: + branches: [ "develop" ] jobs: build: From abba177cf3b9128a8698b62003a122b2d2354feb Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 22:27:48 +0900 Subject: [PATCH 02/25] =?UTF-8?q?chore:=20=EC=84=9C=EB=B2=84=EB=A1=9C=20?= =?UTF-8?q?=EC=BB=B4=ED=8F=AC=EC=A6=88=20=ED=8C=8C=EC=9D=BC=EC=9D=84=20?= =?UTF-8?q?=EC=A0=84=EC=86=A1=ED=95=98=EB=8A=94=20=EC=8A=A4=ED=85=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/develop_build_deploy.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 9e87a70dc..d01dc7c32 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -63,6 +63,17 @@ jobs: push: true tags: ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ steps.github-sha-short.outputs.sha }} + # 서버로 docker-compose 파일 전송 + - name: Copy docker-compose.yml to NCP Server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.NCP_HOST }} + username: tenminute + key: ${{ secrets.NCP_PRIVATE_KEY }} + port: ${{ secrets.NCP_PORT }} + source: docker-compose.yaml + target: / + deploy: runs-on: ubuntu-latest environment: DEV From bb54d1da920a370a8e2b5afadb17b21907779ac3 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:23:13 +0900 Subject: [PATCH 03/25] =?UTF-8?q?chore:=20=EB=B9=8C=EB=93=9C=20=EC=8B=9C?= =?UTF-8?q?=20=EC=9E=90=EB=B0=94=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20eclipse-t?= =?UTF-8?q?emurin=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0492f4f83..b54d10e7a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM amazoncorretto:17 +FROM eclipse-temurin:17 ARG JAR_FILE=build/libs/*.jar COPY ${JAR_FILE} app.jar ENTRYPOINT ["java","-jar","/app.jar"] From a3190cccca48cc32d16d7445ec525ee5ba502c66 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:23:28 +0900 Subject: [PATCH 04/25] =?UTF-8?q?chore:=20=EC=BB=B4=ED=8F=AC=EC=A6=88=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=20=EC=9E=91=EC=84=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 docker-compose.yaml diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 000000000..37fca6048 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +version: "3.8" + +services: + backend: + image: ${NCP_CONTAINER_REGISTRY}/server-spring:${NCP_IMAGE_TAG} + container_name: server-spring + restart: always + network_mode: host + ports: + - "8080:8080" From c33f31617e62e0693098a878e2fa2e6b45fffd2f Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:23:37 +0900 Subject: [PATCH 05/25] =?UTF-8?q?chore:=20=EC=BB=B4=ED=8F=AC=EC=A6=88=20?= =?UTF-8?q?=ED=8C=8C=EC=9D=BC=EC=97=90=20=EC=82=AC=EC=9A=A9=ED=95=A0=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index d01dc7c32..996852b56 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -78,6 +78,9 @@ jobs: runs-on: ubuntu-latest environment: DEV needs: build + env: + NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} + NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} steps: - name: Login to NCP Server uses: appleboy/ssh-action@master From 3e24e17db58b52ad4e0b9dbeec1b2dc0c1dbd898 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:40:54 +0900 Subject: [PATCH 06/25] =?UTF-8?q?chore:=20=EC=8B=9C=ED=81=AC=EB=A6=BF?= =?UTF-8?q?=EC=9D=84=20=EC=82=AC=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 996852b56..747404b2c 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -68,7 +68,7 @@ jobs: uses: appleboy/scp-action@master with: host: ${{ secrets.NCP_HOST }} - username: tenminute + username: ${{ secrets.NCP_USERNAME }} key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} source: docker-compose.yaml From 6d8d51701d6d4a249d8d1db41e34258aa6de8a19 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:41:14 +0900 Subject: [PATCH 07/25] =?UTF-8?q?fix:=20=EA=B6=8C=ED=95=9C=20=EB=AC=B8?= =?UTF-8?q?=EC=A0=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 747404b2c..f00a371e4 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -72,7 +72,7 @@ jobs: key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} source: docker-compose.yaml - target: / + target: /home/tenminute/ deploy: runs-on: ubuntu-latest From 9da4b4938eb71ee868cea757de8c1f16b87b64d8 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:41:25 +0900 Subject: [PATCH 08/25] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EC=BB=B4?= =?UTF-8?q?=ED=8F=AC=EC=A6=88=EB=A5=BC=20=EC=8B=A4=ED=96=89=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index f00a371e4..a05a184aa 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -92,5 +92,6 @@ jobs: script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} - docker stop server-spring && docker rm server-spring - docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} + docker compose -f /home/tenminute/docker-compose.yaml up -d +# docker stop server-spring && docker rm server-spring +# docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} From d803cf0f7898b2b51aa509a302f76b0dad30c119 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:48:18 +0900 Subject: [PATCH 09/25] =?UTF-8?q?fix:=20scp=20action=EC=9D=98=20=EB=B2=84?= =?UTF-8?q?=EC=A0=84=EC=9D=84=20=EA=B3=A0=EC=A0=95=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index a05a184aa..dd46c1a0f 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -65,7 +65,7 @@ jobs: # 서버로 docker-compose 파일 전송 - name: Copy docker-compose.yml to NCP Server - uses: appleboy/scp-action@master + uses: appleboy/scp-action@0.1.4 with: host: ${{ secrets.NCP_HOST }} username: ${{ secrets.NCP_USERNAME }} From 24a9d3f0f688b761b6bef9091de92e45158605aa Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Wed, 29 Nov 2023 23:53:48 +0900 Subject: [PATCH 10/25] =?UTF-8?q?fix:=20=EC=98=A4=ED=83=80=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index dd46c1a0f..16eb7ee12 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -65,7 +65,7 @@ jobs: # 서버로 docker-compose 파일 전송 - name: Copy docker-compose.yml to NCP Server - uses: appleboy/scp-action@0.1.4 + uses: appleboy/scp-action@v0.1.4 with: host: ${{ secrets.NCP_HOST }} username: ${{ secrets.NCP_USERNAME }} From 1fe9040c2ad4dd011f557a2e26fdd077e72d27d1 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 00:01:33 +0900 Subject: [PATCH 11/25] =?UTF-8?q?fix:=20=EC=9C=A0=EC=A0=80=EB=84=A4?= =?UTF-8?q?=EC=9E=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 16eb7ee12..7842ec3dc 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -68,7 +68,7 @@ jobs: uses: appleboy/scp-action@v0.1.4 with: host: ${{ secrets.NCP_HOST }} - username: ${{ secrets.NCP_USERNAME }} + username: tenminute key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} source: docker-compose.yaml From 4f740a6084301306891096bae36812c183b8d9a4 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 00:22:37 +0900 Subject: [PATCH 12/25] =?UTF-8?q?fix:=20=EC=89=98=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=A0=84=EB=8B=AC?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 7842ec3dc..f6e2b80c7 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -78,12 +78,12 @@ jobs: runs-on: ubuntu-latest environment: DEV needs: build - env: - NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} - NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} steps: - - name: Login to NCP Server + - name: Deploy to NCP Server uses: appleboy/ssh-action@master + env: + NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} + NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: host: ${{ secrets.NCP_HOST }} username: tenminute From 7969b21800395e86d3aad5307e9b0f928fa9ed4a Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 00:27:53 +0900 Subject: [PATCH 13/25] =?UTF-8?q?fix:=20=EC=82=AC=EC=9A=A9=ED=95=A0=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20=EC=A7=80=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index f6e2b80c7..e2081f53f 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -89,6 +89,7 @@ jobs: username: tenminute key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} + envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} From fc7bd4b72343d6775492d7ef103e4feaccc36fd4 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 00:37:57 +0900 Subject: [PATCH 14/25] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EB=AF=B8?= =?UTF-8?q?=EC=82=AC=EC=9A=A9=20=EB=A6=AC=EC=86=8C=EC=8A=A4=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EB=AA=85=EB=A0=B9=EC=96=B4=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index e2081f53f..ece86d04d 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -83,7 +83,7 @@ jobs: uses: appleboy/ssh-action@master env: NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} - NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} + NCP_IMAGE_TAG: ${{ steps.github-sha-short.outputs.sha }} with: host: ${{ secrets.NCP_HOST }} username: tenminute @@ -94,5 +94,6 @@ jobs: echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} docker compose -f /home/tenminute/docker-compose.yaml up -d + docker system prune -a -f # docker stop server-spring && docker rm server-spring # docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} From f3ac0ea28eb5dbca515c7c6201bdcd64bcf7a0ad Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 00:42:25 +0900 Subject: [PATCH 15/25] =?UTF-8?q?fix:=20=EC=9D=B4=EB=AF=B8=EC=A7=80?= =?UTF-8?q?=EB=A7=8C=20=EC=82=AD=EC=A0=9C=ED=95=98=EB=8F=84=EB=A1=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index ece86d04d..f32a097b0 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -94,6 +94,6 @@ jobs: echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} docker compose -f /home/tenminute/docker-compose.yaml up -d - docker system prune -a -f + docker image prune -a -f # docker stop server-spring && docker rm server-spring # docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} From f785c1a745e4875f816b69d19b70a9af199b79d2 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:00:29 +0900 Subject: [PATCH 16/25] =?UTF-8?q?fix:=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index f32a097b0..797afdcf4 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -83,7 +83,7 @@ jobs: uses: appleboy/ssh-action@master env: NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} - NCP_IMAGE_TAG: ${{ steps.github-sha-short.outputs.sha }} + NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: host: ${{ secrets.NCP_HOST }} username: tenminute From 4d1bd488ea9186721e6529b200c9c2b6b14dce29 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:06:20 +0900 Subject: [PATCH 17/25] =?UTF-8?q?chore:=20=ED=98=B8=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=EB=AA=A8=EB=93=9C=20=EC=82=AC=EC=9A=A9=20=EC=8B=9C=20=ED=8F=AC?= =?UTF-8?q?=ED=8A=B8=20=EB=B0=94=EC=9D=B8=EB=94=A9=20=EC=98=B5=EC=85=98=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 37fca6048..1695a3e31 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,5 +6,3 @@ services: container_name: server-spring restart: always network_mode: host - ports: - - "8080:8080" From b9104041636362c2198e631f5445875687ccea08 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:12:00 +0900 Subject: [PATCH 18/25] =?UTF-8?q?chore:=20=EC=BB=B4=ED=8F=AC=EC=A6=88?= =?UTF-8?q?=EA=B0=80=20=EC=A0=84=EC=97=AD=20=EC=BB=A8=ED=85=8D=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=EC=9D=98=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98?= =?UTF-8?q?=EB=A5=BC=20=EC=A7=81=EC=A0=91=20=EC=B0=B8=EC=A1=B0=ED=95=98?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 6 +++--- docker-compose.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 797afdcf4..04855f407 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -82,14 +82,14 @@ jobs: - name: Deploy to NCP Server uses: appleboy/ssh-action@master env: - NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} - NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} + # NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} + # NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: host: ${{ secrets.NCP_HOST }} username: tenminute key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} - envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG + # envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} diff --git a/docker-compose.yaml b/docker-compose.yaml index 1695a3e31..0321f4693 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3.8" services: backend: - image: ${NCP_CONTAINER_REGISTRY}/server-spring:${NCP_IMAGE_TAG} + image: ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} container_name: server-spring restart: always network_mode: host From 0e8f4268f2fa510b5f1d699bb422c370e646cdc7 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:13:27 +0900 Subject: [PATCH 19/25] =?UTF-8?q?fix:=20=EC=A3=BC=EC=84=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 04855f407..bd52352df 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -81,7 +81,7 @@ jobs: steps: - name: Deploy to NCP Server uses: appleboy/ssh-action@master - env: + # env: # NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} # NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: From cc9e72e37530e4499a486820aaaead5b117a898c Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:17:13 +0900 Subject: [PATCH 20/25] =?UTF-8?q?Revert=20"fix:=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=88=98=EC=A0=95"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 0e8f4268f2fa510b5f1d699bb422c370e646cdc7. --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index bd52352df..04855f407 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -81,7 +81,7 @@ jobs: steps: - name: Deploy to NCP Server uses: appleboy/ssh-action@master - # env: + env: # NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} # NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: From d336a3cbbeda0cd88dc04d8aec2bfd432863f708 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:17:16 +0900 Subject: [PATCH 21/25] =?UTF-8?q?Revert=20"chore:=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EC=A6=88=EA=B0=80=20=EC=A0=84=EC=97=AD=20=EC=BB=A8=ED=85=8D?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=EC=9D=98=20=ED=99=98=EA=B2=BD=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=A5=BC=20=EC=A7=81=EC=A0=91=20=EC=B0=B8=EC=A1=B0?= =?UTF-8?q?=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98=EC=A0=95=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit b9104041636362c2198e631f5445875687ccea08. --- .github/workflows/develop_build_deploy.yml | 6 +++--- docker-compose.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 04855f407..797afdcf4 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -82,14 +82,14 @@ jobs: - name: Deploy to NCP Server uses: appleboy/ssh-action@master env: - # NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} - # NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} + NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} + NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: host: ${{ secrets.NCP_HOST }} username: tenminute key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} - # envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG + envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} diff --git a/docker-compose.yaml b/docker-compose.yaml index 0321f4693..1695a3e31 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -2,7 +2,7 @@ version: "3.8" services: backend: - image: ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} + image: ${NCP_CONTAINER_REGISTRY}/server-spring:${NCP_IMAGE_TAG} container_name: server-spring restart: always network_mode: host From c34772f09af615042019aebde635bac1263f46e7 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:18:06 +0900 Subject: [PATCH 22/25] =?UTF-8?q?docs:=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 797afdcf4..6744115c6 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -89,7 +89,7 @@ jobs: username: tenminute key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} - envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG + envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG # docker-compose.yml 에서 사용할 환경 변수 script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} From b7b8471f8d1b564332b9f61dc212d8d9ba63e758 Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:19:17 +0900 Subject: [PATCH 23/25] =?UTF-8?q?chore:=20=EC=A3=BC=EC=84=9D=20=EC=B2=98?= =?UTF-8?q?=EB=A6=AC=ED=95=9C=20=EB=AA=85=EB=A0=B9=EC=96=B4=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index 6744115c6..f8acf3d80 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -95,5 +95,3 @@ jobs: docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} docker compose -f /home/tenminute/docker-compose.yaml up -d docker image prune -a -f -# docker stop server-spring && docker rm server-spring -# docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} From a39b472d21390796967638db4646e968cac89e2d Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:23:36 +0900 Subject: [PATCH 24/25] =?UTF-8?q?chore:=20=EC=9B=8C=ED=81=AC=ED=94=8C?= =?UTF-8?q?=EB=A1=9C=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20=ED=8A=B8=EB=A6=AC?= =?UTF-8?q?=EA=B1=B0=20=EB=A1=A4=EB=B0=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_build_deploy.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/develop_build_deploy.yml b/.github/workflows/develop_build_deploy.yml index f8acf3d80..12ca5b109 100644 --- a/.github/workflows/develop_build_deploy.yml +++ b/.github/workflows/develop_build_deploy.yml @@ -3,8 +3,6 @@ name: develop Build And Deploy on: push: branches: [ "develop" ] - pull_request: - branches: [ "develop" ] jobs: build: From 899c21c721d3b662478a4475a87ca96e9b26e80f Mon Sep 17 00:00:00 2001 From: uwoobeat Date: Thu, 30 Nov 2023 01:57:03 +0900 Subject: [PATCH 25/25] =?UTF-8?q?chore:=20=EB=B0=B0=ED=8F=AC=20=EC=A0=84?= =?UTF-8?q?=EC=9A=A9=20=EC=9B=8C=ED=81=AC=ED=94=8C=EB=A1=9C=EC=97=90=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=82=AC=ED=95=AD=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/develop_deploy.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/develop_deploy.yml b/.github/workflows/develop_deploy.yml index cec05e438..8d1932e9b 100644 --- a/.github/workflows/develop_deploy.yml +++ b/.github/workflows/develop_deploy.yml @@ -11,19 +11,21 @@ jobs: deploy: runs-on: ubuntu-latest environment: DEV + needs: build steps: - - name: checkout - uses: actions/checkout@master - - - name: Login to NCP Server + - name: Deploy to NCP Server uses: appleboy/ssh-action@master + env: + NCP_CONTAINER_REGISTRY: ${{ secrets.NCP_CONTAINER_REGISTRY }} + NCP_IMAGE_TAG: ${{ needs.build.outputs.sha }} with: host: ${{ secrets.NCP_HOST }} username: tenminute key: ${{ secrets.NCP_PRIVATE_KEY }} port: ${{ secrets.NCP_PORT }} + envs: NCP_CONTAINER_REGISTRY,NCP_IMAGE_TAG # docker-compose.yml 에서 사용할 환경 변수 script: | echo "${{ secrets.NCP_SECRET_KEY }}" | docker login -u "${{ secrets.NCP_ACCESS_KEY }}" --password-stdin "${{ secrets.NCP_CONTAINER_REGISTRY }}" - docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ github.event.inputs.commit_hash }} - docker stop server-spring && docker rm server-spring - docker run -d --name server-spring -p 8080:8080 -d ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ github.event.inputs.commit_hash }} + docker pull ${{ secrets.NCP_CONTAINER_REGISTRY }}/server-spring:${{ needs.build.outputs.sha }} + docker compose -f /home/tenminute/docker-compose.yaml up -d + docker image prune -a -f