From 24f1541617e05f79b12bea734fba2444d9395973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Wed, 9 Oct 2024 14:08:14 +0900 Subject: [PATCH 01/25] =?UTF-8?q?[BE]=20=EC=9A=B4=EC=98=81=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=EB=B0=B0=ED=8F=AC=20(#742)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: 링크 삭제 시 액세스코드 검증 추가 * test: 테스트용 fakeServer 구현 * test: fakeServer 테스트 추가 * test: OpenGraphServiceTest 테스트 개선 * test: 레퍼런스링크와 오픈그래프 테스트 개선 * refactor: 페어룸으로 레퍼런스링크 찾는 메서드 * feat: github OAuth 간소화 (#731) * [BE] CORS 추가 (#733) * feat: github OAuth 간소화 * feat: github OAuth 간소화 * refactor: 페어룸 존재 여부 확인 API 변경 * refactor: 메서드 이름 변경 * Revert "[BE] CORS 추가 (#733)" This reverts commit 2d4fbeec9222e5fba458552021560541f4727fbc. * Revert "feat: github OAuth 간소화 (#731) (#732)" This reverts commit 7cf9850279e02dd36438fab02b2a0ac1ae200726. * fix: DB 커넥션 고갈 문제 수정 --------- Co-authored-by: yechop Co-authored-by: 이예찬 <148426765+yechop@users.noreply.github.com> Co-authored-by: reddevilmidzy Co-authored-by: Redddy <78539407+reddevilmidzy@users.noreply.github.com> --- .../java/site/coduo/pairroom/controller/docs/PairRoomDocs.java | 1 - backend/src/main/resources/application-prod.yml | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/site/coduo/pairroom/controller/docs/PairRoomDocs.java b/backend/src/main/java/site/coduo/pairroom/controller/docs/PairRoomDocs.java index b7b230652..f2727b273 100644 --- a/backend/src/main/java/site/coduo/pairroom/controller/docs/PairRoomDocs.java +++ b/backend/src/main/java/site/coduo/pairroom/controller/docs/PairRoomDocs.java @@ -74,5 +74,4 @@ ResponseEntity> getPairRooms( @ApiResponse(responseCode = "200", description = "페어룸 존재 여부", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE, schema = @Schema(implementation = PairRoomExistResponse.class))) ResponseEntity pairRoomExists(String accessCode); - } diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index 5e51c6e59..ac8d94932 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -21,6 +21,7 @@ spring: hibernate: ddl-auto: ${DDL_AUTO} database-platform: org.hibernate.dialect.MySQLDialect + open-in-view: false springdoc: swagger-ui: From 09a5e697e2a5f7a68857b34dd5284105148ebbf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Fri, 18 Oct 2024 16:57:58 +0900 Subject: [PATCH 02/25] =?UTF-8?q?[BE]=20=EC=9A=B4=EC=98=81=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=EB=AC=B4=EC=A4=91=EB=8B=A8=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20=EA=B5=AC=EC=84=B1=20(#831)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: BLUE/GREEN 적용 스크립트 * chore: 무중단 배포를 위한 스크립트 코드 변경 * chore: 액추에이터 health check 엔드포인트 활성화 --- .github/workflows/be_cd-production.yml | 51 ++++++++++++++----- backend/be_app-docker-compose.yml | 12 ++--- .../src/main/resources/application-prod.yml | 2 +- 3 files changed, 44 insertions(+), 21 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 717379615..2decf9eeb 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -69,6 +69,14 @@ jobs: - name: Extract secrets as .be_app-env file run: | + echo $(pwd) + chmod +x ./deploy.sh # 스크립트에 실행 권한 부여 + echo chmod ok + source ./deploy.sh + echo source ok + echo "BLUE_PORT=$BLUE_PORT" >> $GITHUB_ENV + echo "GREEN_PORT=$GREEN_PORT" >> $GITHUB_ENV + cat < ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env # Docker Hub info from Github Secrets @@ -97,21 +105,27 @@ jobs: INSTANCE_NAME=${{ secrets.INSTANCE_A_NAME }} # Server App - SERVER_BINDING_PORT=${{ secrets.PRODUCTION_SERVER_BINDING_PORT }} + BLUE_SERVER_BINDING_PORT=${BLUE_PORT} + GREEN_SERVER_BINDING_PORT=${GREEN_PORT} SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF + + - name: Start the new (green/blue) environment + run: | + sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d - - name: Stop and remove existing containers + - name: Wait for new environment to be healthy run: | - sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml down --rmi all - - name: Deploy docker container + until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done + + - name: Stop and remove the old environment run: | - sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml up -d + sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $BLUE_PORT down deployB: environment: production runs-on: production-ec2-B-runner - needs: deployA + needs: build defaults: run: working-directory: ./backend @@ -126,12 +140,16 @@ jobs: run: | sudo mv be_app-docker-compose.yml ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/ - - name: waiting deployA complete - run: | - sudo ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/scheduler.sh - - name: Extract secrets as .be_app-env file run: | + echo $(pwd) + chmod +x ./deploy.sh # 스크립트에 실행 권한 부여 + echo chmod ok + source ./deploy.sh + echo source ok + echo "BLUE_PORT=$BLUE_PORT" >> $GITHUB_ENV + echo "GREEN_PORT=$GREEN_PORT" >> $GITHUB_ENV + cat < ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env # Docker Hub info from Github Secrets @@ -166,9 +184,14 @@ jobs: SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF - - name: Stop and remove existing containers + - name: Start the new (green/blue) environment run: | - sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml down --rmi all - - name: Deploy docker container + sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d + + - name: Wait for new environment to be healthy + run: | + until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done + + - name: Stop and remove the old environment run: | - sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml up -d + sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $BLUE_PORT down diff --git a/backend/be_app-docker-compose.yml b/backend/be_app-docker-compose.yml index e2a14e20e..34b00cbba 100644 --- a/backend/be_app-docker-compose.yml +++ b/backend/be_app-docker-compose.yml @@ -1,14 +1,13 @@ services: - - springboot: - container_name: coduo_springboot-app + springboot-green: + container_name: coduo_springboot-app-${GREEN_SERVER_BINDING_PORT} image: ${DOCKER_REPO_NAME}/springboot-app:test-latest platform: linux/arm64 ports: - - ${SERVER_BINDING_PORT} + - "${GREEN_SERVER_BINDING_PORT}:${GREEN_SERVER_BINDING_PORT}" volumes: - - ${SERVER_LOGS_PATH}/springboot-app:/logs - - ${SERVER_LOGS_PATH}/springboot-app/backup:/logs/backup + - ${SERVER_LOGS_PATH}/springboot-app/green:/logs + - ${SERVER_LOGS_PATH}/springboot-app/backup/green:/logs/backup environment: SPRING_DATASOURCE_REPLICA_MASTER_JDBC-URL: ${MASTER_DB_URL} SPRING_DATASOURCE_REPLICA_MASTER_USERNAME: ${MASTER_DB_USERNAME} @@ -22,6 +21,7 @@ services: OAUTH_GITHUB_REDIRECT_URI: ${CLIENT_REDIRECT_URI} JWT_SIGN_KEY: ${JWT_KEY} EC2_PREFIX: ${INSTANCE_NAME} + SERVER_PORT: ${GREEN_SERVER_BINDING_PORT} restart: on-failure networks: - coduo_net diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index ac8d94932..91cb7d1c4 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -33,7 +33,7 @@ management: endpoints: web: exposure: - include: prometheus + include: prometheus, health base-path: /api/actuator server: From b5e4b7510267ea2f9a4eb3c524fa94ba4ca3bb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Fri, 18 Oct 2024 17:44:31 +0900 Subject: [PATCH 03/25] =?UTF-8?q?[BE]=20=EB=8F=84=EC=BB=A4=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20?= =?UTF-8?q?=EB=B2=84=EC=A0=84=20=EC=A0=95=EB=B3=B4=20=EC=A0=9C=EA=B1=B0=20?= =?UTF-8?q?(#832)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: BLUE/GREEN 적용 스크립트 * chore: 무중단 배포를 위한 스크립트 코드 변경 * chore: 액추에이터 health check 엔드포인트 활성화 * chore: 도커 이미지 버전 정보 제거 --- .github/workflows/be_cd-production.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 2decf9eeb..0160332e3 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -40,8 +40,8 @@ jobs: - name: Image build and push run: | - docker build --build-arg PROFILE=prod --build-arg DEPENDENCY=build/dependency -t ${{ secrets.DOCKER_REPO_NAME }}/springboot-app:test-latest --platform linux/arm64 . - docker push ${{ secrets.DOCKER_REPO_NAME }}/springboot-app:test-latest + docker build --build-arg PROFILE=prod --build-arg DEPENDENCY=build/dependency -t ${{ secrets.DOCKER_REPO_NAME }}/springboot-app --platform linux/arm64 . + docker push ${{ secrets.DOCKER_REPO_NAME }}/springboot-app - name: Upload docker-compose yaml script to artifact uses: actions/upload-artifact@v4 From 0500247de4139a88ff0df243d92f93d54d676664 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Fri, 18 Oct 2024 17:59:13 +0900 Subject: [PATCH 04/25] =?UTF-8?q?[BE]=20=EB=B0=B0=ED=8F=AC=20=EC=98=A4?= =?UTF-8?q?=EB=A5=98=20=EC=88=98=EC=A0=95=20=20(#833)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: BLUE/GREEN 적용 스크립트 * chore: 무중단 배포를 위한 스크립트 코드 변경 * chore: 액추에이터 health check 엔드포인트 활성화 * chore: 도커 이미지 버전 정보 제거 * chore: 배포 시 이전 버전 도커 이미지 삭제 --- .github/workflows/be_cd-production.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 0160332e3..b4c15f4dd 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -184,6 +184,10 @@ jobs: SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF + - name: remove old spring-app image + run: | + sudo docker image rm -f coduo2024/springboot-app; + - name: Start the new (green/blue) environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d From b4e6aeb0ada9ad1c0341c5e2edda81ed356ae174 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Fri, 18 Oct 2024 18:11:34 +0900 Subject: [PATCH 05/25] =?UTF-8?q?chore:=20=EB=AC=B4=EC=A4=91=EB=8B=A8=20?= =?UTF-8?q?=EB=B0=B0=ED=8F=AC=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=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/be_cd-production.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index b4c15f4dd..68b7acdb6 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -109,6 +109,10 @@ jobs: GREEN_SERVER_BINDING_PORT=${GREEN_PORT} SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF + + - name: remove old spring-app image + run: | + sudo docker image rm -f coduo2024/springboot-app; - name: Start the new (green/blue) environment run: | From 9637bc47cbd000cc04242f87e0a2c58c1c291874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Fri, 18 Oct 2024 18:45:20 +0900 Subject: [PATCH 06/25] =?UTF-8?q?[BE]=20=EC=9A=B4=EC=98=81=20=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20=EB=AC=B4=EC=A4=91=EB=8B=A8=20=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=20=EC=8A=A4=ED=81=AC=EB=A6=BD?= =?UTF-8?q?=ED=8A=B8=20=EC=82=AD=EC=A0=9C=20(#835)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: BLUE/GREEN 적용 스크립트 * chore: 무중단 배포를 위한 스크립트 코드 변경 * chore: 액추에이터 health check 엔드포인트 활성화 * chore: 도커 이미지 버전 정보 제거 * chore: 배포 시 이전 버전 도커 이미지 삭제 * chore: 불필요 정보 삭제 --- .github/workflows/be_cd-production.yml | 5 +---- backend/be_app-docker-compose.yml | 3 ++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 68b7acdb6..ddd0b219f 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -83,7 +83,6 @@ jobs: DOCKER_REPO_NAME=${{ secrets.DOCKER_REPO_NAME }} # DB Configuration secrets info from Github Secrets - MYSQL_DB_NAME=${{ secrets.MYSQL_DB_NAME }} MYSQL_TIME_ZONE=${{ secrets.MYSQL_TIME_ZONE }} DB_BINDING_PORT=${{ secrets.DB_BINDING_PORT }} DOCKER_DATA_PATH=${{ secrets.DOCKER_DATA_PATH }} @@ -172,7 +171,6 @@ jobs: SLAVE_DB_PASSWORD=${{ secrets.SLAVE_DB_PASSWORD }} DDL_AUTO=${{ secrets.DDL_AUTO }} - # OAUTH & JWT CLIENT_ID=${{ secrets.CLIENT_ID }} CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} @@ -182,7 +180,6 @@ jobs: # INSTANCE NAME INSTANCE_NAME=${{ secrets.INSTANCE_B_NAME }} - # Server App SERVER_BINDING_PORT=${{ secrets.PRODUCTION_SERVER_BINDING_PORT }} SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} @@ -191,7 +188,7 @@ jobs: - name: remove old spring-app image run: | sudo docker image rm -f coduo2024/springboot-app; - + - name: Start the new (green/blue) environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d diff --git a/backend/be_app-docker-compose.yml b/backend/be_app-docker-compose.yml index 34b00cbba..ca8bb1451 100644 --- a/backend/be_app-docker-compose.yml +++ b/backend/be_app-docker-compose.yml @@ -1,7 +1,8 @@ services: springboot-green: container_name: coduo_springboot-app-${GREEN_SERVER_BINDING_PORT} - image: ${DOCKER_REPO_NAME}/springboot-app:test-latest + image: ${DOCKER_REPO_NAME}/springboot-app + platform: linux/arm64 ports: - "${GREEN_SERVER_BINDING_PORT}:${GREEN_SERVER_BINDING_PORT}" From bc2843752772bd6a9514d702566727996a1082b0 Mon Sep 17 00:00:00 2001 From: reddevilmidzy Date: Fri, 18 Oct 2024 21:42:20 +0900 Subject: [PATCH 07/25] =?UTF-8?q?chore:=20A=20'=EB=B0=B0=ED=8F=AC=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20=EB=AC=B4=EC=A4=91=EB=8B=A8=20=EB=B0=B0?= =?UTF-8?q?=ED=8F=AC=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=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/be_cd-production.yml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index ddd0b219f..d9f9f8598 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -109,18 +109,23 @@ jobs: SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF - - name: remove old spring-app image - run: | - sudo docker image rm -f coduo2024/springboot-app; - - name: Start the new (green/blue) environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d + - name: remove old spring-app image + run: | + sudo docker image rm -f coduo2024/springboot-app; + - name: Wait for new environment to be healthy run: | until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done + - name: Switch NGINX to Green Port + run: | + sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf + sudo systemctl reload nginx + - name: Stop and remove the old environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $BLUE_PORT down From 92deacb0f78911f7c2454b260bc8719e5a6c0480 Mon Sep 17 00:00:00 2001 From: reddevilmidzy Date: Fri, 18 Oct 2024 22:35:25 +0900 Subject: [PATCH 08/25] =?UTF-8?q?style:=20healthcheck=20api=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/site/coduo/common/controller/CommonController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/site/coduo/common/controller/CommonController.java b/backend/src/main/java/site/coduo/common/controller/CommonController.java index bc4b16862..2257e13eb 100644 --- a/backend/src/main/java/site/coduo/common/controller/CommonController.java +++ b/backend/src/main/java/site/coduo/common/controller/CommonController.java @@ -13,6 +13,6 @@ public String healthCheck() { @GetMapping("/help") public String help() { - return "불쌍한 켈리를 살려주세요..."; + return "쓰껄ㄹ"; } } From edcc744debc84c215d14c3a48b3fec214a709e3c Mon Sep 17 00:00:00 2001 From: lemone Date: Sat, 19 Oct 2024 15:56:03 +0900 Subject: [PATCH 09/25] =?UTF-8?q?chore:=20deployB=20blue-green=20port=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index d9f9f8598..7d46ada71 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -186,22 +186,28 @@ jobs: INSTANCE_NAME=${{ secrets.INSTANCE_B_NAME }} # Server App - SERVER_BINDING_PORT=${{ secrets.PRODUCTION_SERVER_BINDING_PORT }} + BLUE_SERVER_BINDING_PORT=${BLUE_PORT} + GREEN_SERVER_BINDING_PORT=${GREEN_PORT} SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF - - name: remove old spring-app image - run: | - sudo docker image rm -f coduo2024/springboot-app; - - name: Start the new (green/blue) environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d + - name: remove old spring-app image + run: | + sudo docker image rm -f coduo2024/springboot-app; + - name: Wait for new environment to be healthy run: | until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done + - name: Switch NGINX to Green Port + run: | + sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf + sudo systemctl reload nginx + - name: Stop and remove the old environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $BLUE_PORT down From ed5b8dde72e75d105bf62c5a10bf34fd907e0d79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sat, 19 Oct 2024 16:22:38 +0900 Subject: [PATCH 10/25] =?UTF-8?q?chore:=20=EC=9A=B4=EC=98=81=EC=84=9C?= =?UTF-8?q?=EB=B2=84=20B=20nginx=20=EB=8F=84=EC=BB=A4=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 7d46ada71..9240db0cb 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -205,8 +205,7 @@ jobs: - name: Switch NGINX to Green Port run: | - sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf - sudo systemctl reload nginx + docker exec -it coduo_nginx bash -c "sed -i 's/listen 808[01];/listen ${GREEN_PORT};/' /etc/nginx/nginx.conf && nginx -s reload" - name: Stop and remove the old environment run: | From f1af961dd8fee6c2606d6f3ccf533efd43f20b14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sat, 19 Oct 2024 16:25:31 +0900 Subject: [PATCH 11/25] =?UTF-8?q?chore:=20=20=EC=9A=B4=EC=98=81=20B=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20nginx=20=EB=8F=84=EC=BB=A4=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 9240db0cb..29b5925f9 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -205,7 +205,7 @@ jobs: - name: Switch NGINX to Green Port run: | - docker exec -it coduo_nginx bash -c "sed -i 's/listen 808[01];/listen ${GREEN_PORT};/' /etc/nginx/nginx.conf && nginx -s reload" + sudo docker exec -it coduo_nginx bash -c "sed -i 's/listen 808[01];/listen ${GREEN_PORT};/' /etc/nginx/nginx.conf && nginx -s reload" - name: Stop and remove the old environment run: | From 3f51deccda6435ddb6fd06988211ab8760cde90a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sat, 19 Oct 2024 16:33:39 +0900 Subject: [PATCH 12/25] =?UTF-8?q?chore:=20=20=EC=9A=B4=EC=98=81=20B=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20nginx=20=EB=8F=84=EC=BB=A4=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 29b5925f9..0837b0e0f 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -205,7 +205,8 @@ jobs: - name: Switch NGINX to Green Port run: | - sudo docker exec -it coduo_nginx bash -c "sed -i 's/listen 808[01];/listen ${GREEN_PORT};/' /etc/nginx/nginx.conf && nginx -s reload" + sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf + sudo docker exec -it coduo_nginx bash -c "nginx -s reload" - name: Stop and remove the old environment run: | From cb5e08e6c436a01c7cdaff6a7db8c695995a3464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sat, 19 Oct 2024 16:36:19 +0900 Subject: [PATCH 13/25] =?UTF-8?q?chore:=20=20=EC=9A=B4=EC=98=81=20B=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20nginx=20=EB=8F=84=EC=BB=A4=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 0837b0e0f..c18d7f25c 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -206,7 +206,7 @@ jobs: - name: Switch NGINX to Green Port run: | sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf - sudo docker exec -it coduo_nginx bash -c "nginx -s reload" + sudo docker exec -i coduo_nginx bash -c "nginx -s reload" - name: Stop and remove the old environment run: | From 524e8f8842aa2e58e11e46b2aa28ee375b9ebeee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sat, 19 Oct 2024 20:05:14 +0900 Subject: [PATCH 14/25] =?UTF-8?q?chore:=20=EC=9A=B4=EC=98=81=20B=20?= =?UTF-8?q?=EC=84=9C=EB=B2=84=20Nignx=20=EB=A1=9C=EC=BB=AC=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index c18d7f25c..d4016d95c 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -121,9 +121,8 @@ jobs: run: | until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done - - name: Switch NGINX to Green Port + - name: Reload NGINX run: | - sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf sudo systemctl reload nginx - name: Stop and remove the old environment @@ -203,10 +202,9 @@ jobs: run: | until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done - - name: Switch NGINX to Green Port + - name: Reload NGINX run: | - sudo sed -i "s/listen 808[01];/listen ${GREEN_PORT};/" /etc/nginx/nginx.conf - sudo docker exec -i coduo_nginx bash -c "nginx -s reload" + sudo systemctl reload nginx - name: Stop and remove the old environment run: | From f45b323ef6fed51954c36a3fdf8554a5944fc408 Mon Sep 17 00:00:00 2001 From: Redddy <78539407+reddevilmidzy@users.noreply.github.com> Date: Sat, 19 Oct 2024 20:25:06 +0900 Subject: [PATCH 15/25] =?UTF-8?q?refactor:=20=EC=83=88=20=ED=99=98?= =?UTF-8?q?=EA=B2=BD=20=EA=B8=B0=EB=8B=A4=EB=A6=AC=EB=8A=94=20=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index d4016d95c..5690b1be6 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -119,7 +119,7 @@ jobs: - name: Wait for new environment to be healthy run: | - until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done + until curl -sf http://localhost:${GREEN_PORT}/api/actuator/health | grep "UP"; do sleep 5; done - name: Reload NGINX run: | @@ -200,7 +200,7 @@ jobs: - name: Wait for new environment to be healthy run: | - until sudo docker inspect --format '{{json .State.Status}}' coduo_springboot-app-${GREEN_PORT} | grep "running"; do sleep 5; done + until curl -sf http://localhost:${GREEN_PORT}/api/actuator/health | grep "UP"; do sleep 5; done - name: Reload NGINX run: | From 3e7363ef86d08078b5ef5c6fbb58d0f20f7f3c30 Mon Sep 17 00:00:00 2001 From: Redddy <78539407+reddevilmidzy@users.noreply.github.com> Date: Sun, 20 Oct 2024 16:26:20 +0900 Subject: [PATCH 16/25] =?UTF-8?q?fix:=20=EB=A1=9C=EA=B7=B8=20=EA=B2=BD?= =?UTF-8?q?=EB=A1=9C=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/be_app-docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/be_app-docker-compose.yml b/backend/be_app-docker-compose.yml index ca8bb1451..642ac25ff 100644 --- a/backend/be_app-docker-compose.yml +++ b/backend/be_app-docker-compose.yml @@ -7,8 +7,8 @@ services: ports: - "${GREEN_SERVER_BINDING_PORT}:${GREEN_SERVER_BINDING_PORT}" volumes: - - ${SERVER_LOGS_PATH}/springboot-app/green:/logs - - ${SERVER_LOGS_PATH}/springboot-app/backup/green:/logs/backup + - ${SERVER_LOGS_PATH}/springboot-app:/logs + - ${SERVER_LOGS_PATH}/springboot-app/backup:/logs/backup environment: SPRING_DATASOURCE_REPLICA_MASTER_JDBC-URL: ${MASTER_DB_URL} SPRING_DATASOURCE_REPLICA_MASTER_USERNAME: ${MASTER_DB_USERNAME} From bfcf1ca1a4095568d5d56865e26d54355b43b703 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sun, 20 Oct 2024 20:18:25 +0900 Subject: [PATCH 17/25] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EB=8C=95?= =?UTF-8?q?=EA=B8=80=EB=A7=81=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=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/be_cd-test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/be_cd-test.yml b/.github/workflows/be_cd-test.yml index 0eec28b85..72923296c 100644 --- a/.github/workflows/be_cd-test.yml +++ b/.github/workflows/be_cd-test.yml @@ -104,3 +104,7 @@ jobs: - name: Deploy docker container run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml up -d + + - name: Delete Dangling docker images + run: | + sudo docker image prune From b49c8df8f6366a992512181b71a6c51e5df14f2e Mon Sep 17 00:00:00 2001 From: lemone <55480011+JiHyeonL@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:20:24 +0900 Subject: [PATCH 18/25] =?UTF-8?q?chore:=20=EB=A0=88=ED=8F=AC=20=EC=9D=B4?= =?UTF-8?q?=EB=A6=84=20=ED=95=98=EB=93=9C=EC=BD=94=EB=94=A9=20=EB=B3=80?= =?UTF-8?q?=EC=88=98=EB=A1=9C=20=EB=B3=80=EA=B2=BD=20&=20Dangling=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 5690b1be6..cb67c0dd5 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -115,7 +115,7 @@ jobs: - name: remove old spring-app image run: | - sudo docker image rm -f coduo2024/springboot-app; + sudo docker image rm -f ${{ secrets.DOCKER_REPO_NAME }}/springboot-app; - name: Wait for new environment to be healthy run: | @@ -128,7 +128,11 @@ jobs: - name: Stop and remove the old environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $BLUE_PORT down - + + - name: Delete Dangling docker images + run: | + sudo docker image prune + deployB: environment: production runs-on: production-ec2-B-runner @@ -196,7 +200,7 @@ jobs: - name: remove old spring-app image run: | - sudo docker image rm -f coduo2024/springboot-app; + sudo docker image rm -f ${{ secrets.DOCKER_REPO_NAME }}/springboot-app; - name: Wait for new environment to be healthy run: | @@ -209,3 +213,7 @@ jobs: - name: Stop and remove the old environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $BLUE_PORT down + + - name: Delete Dangling docker images + run: | + sudo docker image prune From eb4b4466abf61dc22455894bb38caf63f00ed390 Mon Sep 17 00:00:00 2001 From: lemone <55480011+JiHyeonL@users.noreply.github.com> Date: Sun, 20 Oct 2024 20:33:29 +0900 Subject: [PATCH 19/25] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20=EA=B0=95=EC=A0=9C=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EC=98=B5=EC=85=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/be_cd-production.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index cb67c0dd5..e37921a0a 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -131,7 +131,7 @@ jobs: - name: Delete Dangling docker images run: | - sudo docker image prune + sudo docker image prune -a -f deployB: environment: production @@ -216,4 +216,4 @@ jobs: - name: Delete Dangling docker images run: | - sudo docker image prune + sudo docker image prune -a -f From 7d7b3281ea9c12e1aeee2f36ffaa0e9d9c45f068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sun, 20 Oct 2024 20:49:34 +0900 Subject: [PATCH 20/25] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EB=8C=95?= =?UTF-8?q?=EA=B8=80=EB=A7=81=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=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/be_cd-production.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index e37921a0a..9cb70e021 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -194,14 +194,14 @@ jobs: SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF - - name: Start the new (green/blue) environment - run: | - sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d - - name: remove old spring-app image run: | sudo docker image rm -f ${{ secrets.DOCKER_REPO_NAME }}/springboot-app; + - name: Start the new (green/blue) environment + run: | + sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d + - name: Wait for new environment to be healthy run: | until curl -sf http://localhost:${GREEN_PORT}/api/actuator/health | grep "UP"; do sleep 5; done From 176c07a129faeb38355a944fe9b754798a6b40ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Sun, 20 Oct 2024 20:52:47 +0900 Subject: [PATCH 21/25] =?UTF-8?q?chore:=20=EB=8F=84=EC=BB=A4=20=EB=8C=95?= =?UTF-8?q?=EA=B8=80=EB=A7=81=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EC=8A=A4=ED=81=AC=EB=A6=BD=ED=8A=B8=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/be_cd-production.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index 9cb70e021..dcf0338aa 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -108,14 +108,14 @@ jobs: GREEN_SERVER_BINDING_PORT=${GREEN_PORT} SERVER_LOGS_PATH=${{ secrets.SERVER_LOGS_PATH }} EOF + + - name: remove old spring-app image + run: | + sudo docker image rm -f ${{ secrets.DOCKER_REPO_NAME }}/springboot-app; - name: Start the new (green/blue) environment run: | sudo docker-compose --env-file ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env -f ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/be_app-docker-compose.yml -p $GREEN_PORT up -d - - - name: remove old spring-app image - run: | - sudo docker image rm -f ${{ secrets.DOCKER_REPO_NAME }}/springboot-app; - name: Wait for new environment to be healthy run: | From 823069c8759ced5b184c52b847d926df594075bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Mon, 21 Oct 2024 15:31:32 +0900 Subject: [PATCH 22/25] =?UTF-8?q?chore:=20=EC=9A=B4=EC=98=81,=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=8F=84=EC=BB=A4=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EB=B2=84=EC=A0=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/be_cd-production.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/be_cd-production.yml b/.github/workflows/be_cd-production.yml index dcf0338aa..a4af9e37a 100644 --- a/.github/workflows/be_cd-production.yml +++ b/.github/workflows/be_cd-production.yml @@ -40,8 +40,8 @@ jobs: - name: Image build and push run: | - docker build --build-arg PROFILE=prod --build-arg DEPENDENCY=build/dependency -t ${{ secrets.DOCKER_REPO_NAME }}/springboot-app --platform linux/arm64 . - docker push ${{ secrets.DOCKER_REPO_NAME }}/springboot-app + docker build --build-arg PROFILE=prod --build-arg DEPENDENCY=build/dependency -t ${{ secrets.DOCKER_REPO_NAME }}/springboot-app:latest --platform linux/arm64 . + docker push ${{ secrets.DOCKER_REPO_NAME }}/springboot-app:latest - name: Upload docker-compose yaml script to artifact uses: actions/upload-artifact@v4 @@ -81,6 +81,7 @@ jobs: # Docker Hub info from Github Secrets DOCKER_REPO_NAME=${{ secrets.DOCKER_REPO_NAME }} + DOCKER_IMAGE_VERSION=latest # DB Configuration secrets info from Github Secrets MYSQL_TIME_ZONE=${{ secrets.MYSQL_TIME_ZONE }} @@ -164,6 +165,7 @@ jobs: cat < ${{ secrets.DOCKER_COMPOSE_YAML_PATH }}/.be_app-env # Docker Hub info from Github Secrets + DOCKER_IMAGE_VERSION=latest DOCKER_REPO_NAME=${{ secrets.DOCKER_REPO_NAME }} # DB Configuration secrets info from Github Secrets From 5df2098accdc20bd71aeb26d781c0422d611e6a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=AF=BC=EC=A2=85?= Date: Mon, 21 Oct 2024 15:32:08 +0900 Subject: [PATCH 23/25] =?UTF-8?q?chore:=20=EC=9A=B4=EC=98=81,=20=ED=85=8C?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=8F=84=EC=BB=A4=20=EC=9D=B4=EB=AF=B8?= =?UTF-8?q?=EC=A7=80=20=EB=B2=84=EC=A0=84=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/be_app-docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/be_app-docker-compose.yml b/backend/be_app-docker-compose.yml index 642ac25ff..92c5337cd 100644 --- a/backend/be_app-docker-compose.yml +++ b/backend/be_app-docker-compose.yml @@ -1,7 +1,7 @@ services: springboot-green: container_name: coduo_springboot-app-${GREEN_SERVER_BINDING_PORT} - image: ${DOCKER_REPO_NAME}/springboot-app + image: ${DOCKER_REPO_NAME}/springboot-app:${DOCKER_IMAGE_VERSION} platform: linux/arm64 ports: From 79284914930bc643de4c283d18955226dc278962 Mon Sep 17 00:00:00 2001 From: Redddy <78539407+reddevilmidzy@users.noreply.github.com> Date: Mon, 21 Oct 2024 22:35:36 +0900 Subject: [PATCH 24/25] =?UTF-8?q?style:=20=ED=97=AC=EC=8A=A4=20=EC=B2=B4?= =?UTF-8?q?=ED=81=AC=20=EC=9D=91=EB=8B=B5=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/site/coduo/common/controller/CommonController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/site/coduo/common/controller/CommonController.java b/backend/src/main/java/site/coduo/common/controller/CommonController.java index 2257e13eb..70da0f746 100644 --- a/backend/src/main/java/site/coduo/common/controller/CommonController.java +++ b/backend/src/main/java/site/coduo/common/controller/CommonController.java @@ -13,6 +13,6 @@ public String healthCheck() { @GetMapping("/help") public String help() { - return "쓰껄ㄹ"; + return "에휴"; } } From 02fbd9be7e459c4c5bf57d6f6bbac825dc5faf67 Mon Sep 17 00:00:00 2001 From: lemone Date: Wed, 23 Oct 2024 22:41:49 +0900 Subject: [PATCH 25/25] =?UTF-8?q?chore:=20accept=20count=20100=20->=20300?= =?UTF-8?q?=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 --- backend/src/main/resources/application-prod.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/main/resources/application-prod.yml b/backend/src/main/resources/application-prod.yml index 91cb7d1c4..60b34aee1 100644 --- a/backend/src/main/resources/application-prod.yml +++ b/backend/src/main/resources/application-prod.yml @@ -38,6 +38,7 @@ management: server: tomcat: + accept-count: 300 mbeanregistry: enabled: true