From 3dc6afc79da14a9577e5d8551ce13f1ddc742d2b Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 02:50:24 +0900 Subject: [PATCH 01/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20docker-compose=20p?= =?UTF-8?q?ort=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 68baabe3..4dcb3c8c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,8 +16,8 @@ services: api-gateway: container_name: api-gateway image: ${DOCKERHUB_USERNAME}/waither-gateway - expose: - - "8000" + ports: + - "8000:8000" # restart: always restart: no volumes: @@ -26,8 +26,8 @@ services: config: container_name: config image: ${DOCKERHUB_USERNAME}/waither-config - expose: - - "8888" + ports: + - "8888:8888" environment: CONFIG_GIT_URI : ${CONFIG_GIT_URI} CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} @@ -40,8 +40,8 @@ services: eureka: container_name: eureka image: ${DOCKERHUB_USERNAME}/waither-eureka - expose: - - "8761" + ports: + - "8761:8761" # restart: always restart: no volumes: @@ -50,8 +50,8 @@ services: user-service: container_name: user-service image: ${DOCKERHUB_USERNAME}/waither-user - expose: - - "8080" + ports: + - "8080:8080" # restart: unless-stopped #수동으로 중지되지 않는 이상 항상 재실행 restart: no volumes: @@ -60,8 +60,8 @@ services: weather-service: container_name: weather-service image: ${DOCKERHUB_USERNAME}/waither-weather - expose: - - "8081" + ports: + - "8081:8081" # restart: unless-stopped restart: no volumes: @@ -70,8 +70,8 @@ services: noti-service: container_name: noti-service image: ${DOCKERHUB_USERNAME}/waither-noti - expose: - - "8082" + ports: + - "8082:8082" # restart: unless-stopped restart: no volumes: From 102dcff6cbd16c1aa71aaa98b225db977ebbe91b Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 17:01:34 +0900 Subject: [PATCH 02/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20docker=20image=20?= =?UTF-8?q?=EC=BA=90=EC=8B=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 09774e92..3f8caf6b 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -64,6 +64,7 @@ jobs: #Config-Service Build & Docker Push - name: Build with Gradle - config run: | + docker builder prune cd config-service ./gradlew clean build -x test docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-config . From e96d6ee472a32f21b556ae1cbfe93d66d03f1bf8 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 17:09:59 +0900 Subject: [PATCH 03/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20changed=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noti-service/src/main/resources/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index 71055d41..75dfe11a 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -1,5 +1,5 @@ server: - port: 8082 + port: 8089 spring: application: From 1cbf40cbabca5ee7f1dd741d82c350341db7cfa1 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 17:22:18 +0900 Subject: [PATCH 04/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20print=20bootstrap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 3f8caf6b..99a25b05 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -26,8 +26,6 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - with: - ref: prod #Setting JDK - name: Set up JDK 17 @@ -105,6 +103,7 @@ jobs: - name: Build with Gradle - noti-service run: | cd noti-service + cat /src/main/resources/bootstrap.yml ./gradlew clean build -x test docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti From 8ab582104e74d108c2500a43c797627c79751e28 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 17:24:50 +0900 Subject: [PATCH 05/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20print=20bootstrap?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 99a25b05..d51a8c9d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -103,7 +103,7 @@ jobs: - name: Build with Gradle - noti-service run: | cd noti-service - cat /src/main/resources/bootstrap.yml + cat src/main/resources/bootstrap.yml ./gradlew clean build -x test docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti From b917950fa90d7daddb153f1e5cd38a3a4ba956df Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 17:40:58 +0900 Subject: [PATCH 06/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20changed=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noti-service/src/main/resources/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index 75dfe11a..71055d41 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -1,5 +1,5 @@ server: - port: 8089 + port: 8082 spring: application: From 5e8f6c4d4a7bdc12a8e40eda676278865050e6c6 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 17:47:28 +0900 Subject: [PATCH 07/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20docker=20build=20w?= =?UTF-8?q?ithouth=20cache?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d51a8c9d..c43a6ad0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -86,7 +86,7 @@ jobs: run: | cd apiGateway-service ./gradlew clean build -x test - docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway . + docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway cd .. @@ -105,7 +105,7 @@ jobs: cd noti-service cat src/main/resources/bootstrap.yml ./gradlew clean build -x test - docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . + docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti cd .. @@ -114,7 +114,7 @@ jobs: run: | cd user-service ./gradlew clean build -x test - docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-user . + docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-user . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-user cd .. @@ -123,7 +123,7 @@ jobs: run: | cd weather-service ./gradlew clean build -x test - docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-weather . + docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-weather . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-weather cd .. From 0a8ad144be4827d357796911d4a74f919beb0d2a Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 18:05:59 +0900 Subject: [PATCH 08/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20Dockerfile=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 --- noti-service/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/noti-service/Dockerfile b/noti-service/Dockerfile index 119a7cac..10d13659 100644 --- a/noti-service/Dockerfile +++ b/noti-service/Dockerfile @@ -2,4 +2,5 @@ FROM openjdk:17-jdk ARG JAR_FILE=build/libs/*.jar COPY ${JAR_FILE} app.jar +COPY src/main/resources/bootstrap.yml /config/bootstrap.yml ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-Duser.timezone=Asia/Seoul" , "-jar", "app.jar"] From e91e2d9f697e6440de919f2af14365ea3f857ccb Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 18:23:14 +0900 Subject: [PATCH 09/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20gradle=20build=20p?= =?UTF-8?q?roblem?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 - noti-service/Dockerfile | 1 - noti-service/src/main/resources/bootstrap.yml | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c43a6ad0..4169cb96 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -103,7 +103,6 @@ jobs: - name: Build with Gradle - noti-service run: | cd noti-service - cat src/main/resources/bootstrap.yml ./gradlew clean build -x test docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti diff --git a/noti-service/Dockerfile b/noti-service/Dockerfile index 10d13659..119a7cac 100644 --- a/noti-service/Dockerfile +++ b/noti-service/Dockerfile @@ -2,5 +2,4 @@ FROM openjdk:17-jdk ARG JAR_FILE=build/libs/*.jar COPY ${JAR_FILE} app.jar -COPY src/main/resources/bootstrap.yml /config/bootstrap.yml ENTRYPOINT ["java", "-Dspring.profiles.active=prod", "-Duser.timezone=Asia/Seoul" , "-jar", "app.jar"] diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index 71055d41..75dfe11a 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -1,5 +1,5 @@ server: - port: 8082 + port: 8089 spring: application: From 45db6c322fac2438eddf1a29a8bedc5ce23870fa Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 23:33:46 +0900 Subject: [PATCH 10/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20noti=20build=20nam?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 4169cb96..ed7aa13a 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -104,7 +104,7 @@ jobs: run: | cd noti-service ./gradlew clean build -x test - docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . + docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti-test . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti cd .. From bf976d8c3449faded36524707a902397d680ebda Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 23:34:23 +0900 Subject: [PATCH 11/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20noti=20build=20nam?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ed7aa13a..ac495fcc 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -103,6 +103,7 @@ jobs: - name: Build with Gradle - noti-service run: | cd noti-service + cat src/main/resources/bootstrap.yml ./gradlew clean build -x test docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti-test . docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti From 7beb80fe86aeb8be408761ec88230c18280f4460 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 23:38:29 +0900 Subject: [PATCH 12/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20noti=20build=20nam?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ac495fcc..d833e7ec 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -106,7 +106,7 @@ jobs: cat src/main/resources/bootstrap.yml ./gradlew clean build -x test docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti-test . - docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti + docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti-test cd .. #User-Service Build & Docker Push From a102dc738d33eaa847961a176404b13b1cc1732f Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sat, 25 May 2024 23:48:32 +0900 Subject: [PATCH 13/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20noti=20build=20nam?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index d833e7ec..c43a6ad0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -105,8 +105,8 @@ jobs: cd noti-service cat src/main/resources/bootstrap.yml ./gradlew clean build -x test - docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti-test . - docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti-test + docker build --no-cache -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti . + docker push ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti cd .. #User-Service Build & Docker Push From 6b073e48f442e4aa0951db4075d6d5fdad09fd76 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 00:09:01 +0900 Subject: [PATCH 14/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20ci/cd=20=EC=97=90?= =?UTF-8?q?=EB=9F=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 4 +--- apiGateway-service/src/main/resources/bootstrap.yml | 4 ++-- docker-compose.yml | 7 ++++--- noti-service/src/main/resources/bootstrap.yml | 4 ++-- user-service/src/main/resources/bootstrap.yml | 2 +- weather-service/src/main/resources/bootstrap.yml | 2 +- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index c43a6ad0..96482ad0 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -50,8 +50,7 @@ jobs: cd ./config-service/src/main/resources touch ./bootstrap.yml echo "${{ secrets.CONFIG_APPLICATION_YML }}" > ./bootstrap.yml - cd - + # DockerHub Login - name: Docker Hub Login uses: docker/login-action@v2 @@ -62,7 +61,6 @@ jobs: #Config-Service Build & Docker Push - name: Build with Gradle - config run: | - docker builder prune cd config-service ./gradlew clean build -x test docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/waither-config . diff --git a/apiGateway-service/src/main/resources/bootstrap.yml b/apiGateway-service/src/main/resources/bootstrap.yml index f36f218a..49a963e2 100644 --- a/apiGateway-service/src/main/resources/bootstrap.yml +++ b/apiGateway-service/src/main/resources/bootstrap.yml @@ -11,7 +11,7 @@ spring: uri: http://config:8888 name: database-apiGateway, redis, jwt kafka: - bootstrap-servers: "localhost:9092" + bootstrap-servers: "http://kafka:9092" consumer: group-id: "GroupId" @@ -20,7 +20,7 @@ eureka: register-with-eureka: true fetch-registry: true service-url: - defaultZone: http://localhost:8761/eureka + defaultZone: http://eureka:8761/eureka #management: # Actuator Settings # endpoints: diff --git a/docker-compose.yml b/docker-compose.yml index 4dcb3c8c..b8ba05f9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -23,14 +23,15 @@ services: volumes: - /home/ec2-user/logs/api-gateway:/logs + config: container_name: config image: ${DOCKERHUB_USERNAME}/waither-config ports: - "8888:8888" - environment: - CONFIG_GIT_URI : ${CONFIG_GIT_URI} - CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} +# environment: +# CONFIG_GIT_URI : ${CONFIG_GIT_URI} +# CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} # CONFIG_PRIVATE_KEY_DIR : ${CONFIG_PRIVATE_KEY_DIR} # restart: always restart: no diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index 75dfe11a..1c540186 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -1,5 +1,5 @@ server: - port: 8089 + port: 8082 spring: application: @@ -19,4 +19,4 @@ eureka: register-with-eureka: true # register to eureka server fetch-registry: true # Getting instances' information from eureka server service-url: - defaultZone : http://127.0.0.1:8761/eureka #Eureka Server's address \ No newline at end of file + defaultZone : http://eureka:8761/eureka #Eureka Server's address \ No newline at end of file diff --git a/user-service/src/main/resources/bootstrap.yml b/user-service/src/main/resources/bootstrap.yml index c7977aa7..df14cb37 100644 --- a/user-service/src/main/resources/bootstrap.yml +++ b/user-service/src/main/resources/bootstrap.yml @@ -21,7 +21,7 @@ eureka: register-with-eureka: true # register to eureka server fetch-registry: true # Getting instances' information from eureka server service-url: - defaultZone : http://127.0.0.1:8761/eureka #Eureka Server's address + defaultZone : http://eureka:8761/eureka #Eureka Server's address #management: # Actuator # endpoints: diff --git a/weather-service/src/main/resources/bootstrap.yml b/weather-service/src/main/resources/bootstrap.yml index 4abbfad6..0f023d22 100644 --- a/weather-service/src/main/resources/bootstrap.yml +++ b/weather-service/src/main/resources/bootstrap.yml @@ -21,7 +21,7 @@ eureka: register-with-eureka: true # register to eureka server fetch-registry: true # Getting instances' information from eureka server service-url: - defaultZone : http://127.0.0.1:8761/eureka #Eureka Server's address + defaultZone : http://eureka:8761/eureka #Eureka Server's address management: # Actuator endpoints: From b9b1bf5e63a5609eeca0c9f2379f331ea2850043 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 00:32:45 +0900 Subject: [PATCH 15/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20build=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 6 +++--- script/deploy.sh | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index b8ba05f9..8945c7cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,9 +29,9 @@ services: image: ${DOCKERHUB_USERNAME}/waither-config ports: - "8888:8888" -# environment: -# CONFIG_GIT_URI : ${CONFIG_GIT_URI} -# CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} + environment: + CONFIG_GIT_URI : ${CONFIG_GIT_URI} + CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} # CONFIG_PRIVATE_KEY_DIR : ${CONFIG_PRIVATE_KEY_DIR} # restart: always restart: no diff --git a/script/deploy.sh b/script/deploy.sh index 188626f8..76bc3064 100644 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -10,10 +10,10 @@ # -d : detached 모드. 컨테이너를 백그라운드에서 실행 echo "api-gateway server start..." -docker-compose -f /home/docker-compose.yml up -d api-gateway +docker-compose -f /home/docker-compose.yml up -d api-gateway --build echo "noti-service server start..." -docker-compose -f /home/docker-compose.yml up -d noti-service +docker-compose -f /home/docker-compose.yml up -d noti-service --build echo "user-service server start..." -docker-compose -f /home/docker-compose.yml up -d user-service +docker-compose -f /home/docker-compose.yml up -d user-service --build echo "weather-service server start..." -docker-compose -f /home/docker-compose.yml up -d weather-service +docker-compose -f /home/docker-compose.yml up -d weather-service --build From 458070f45deeea4585042ac668ce3039955e2c19 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 00:48:49 +0900 Subject: [PATCH 16/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 96482ad0..7ccee7e9 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -145,6 +145,12 @@ jobs: export CONFIG_PASSPHRASE=${{ secrets.CONFIG_PASSPHRASE }} export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} + docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-config + docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway + docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti + docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-user + docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-weather + bash /home/docker_init.sh bash /home/common.sh bash /home/deploy.sh From adaaabd53db50c597929cf79328c6b47dc33770e Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 01:07:29 +0900 Subject: [PATCH 17/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20=EC=8A=A4=ED=81=AC?= =?UTF-8?q?=EB=A6=BD=ED=8A=B8=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 7ccee7e9..8c3b5c89 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -50,6 +50,7 @@ jobs: cd ./config-service/src/main/resources touch ./bootstrap.yml echo "${{ secrets.CONFIG_APPLICATION_YML }}" > ./bootstrap.yml + cat bootstrap.yml # DockerHub Login - name: Docker Hub Login From df8ee07774a8475f931ef212d2881a31465b87ea Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 14:46:08 +0900 Subject: [PATCH 18/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 12 ++-- .../src/main/resources/bootstrap.yml | 60 ++++++++++++++++++- 2 files changed, 63 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 8c3b5c89..39970c8d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -45,12 +45,12 @@ jobs: chmod +x ./weather-service/gradlew #Setting yml - - name: Settings for config service - run: | - cd ./config-service/src/main/resources - touch ./bootstrap.yml - echo "${{ secrets.CONFIG_APPLICATION_YML }}" > ./bootstrap.yml - cat bootstrap.yml +# - name: Settings for config service +# run: | +# cd ./config-service/src/main/resources +# touch ./bootstrap.yml +# echo "${{ secrets.CONFIG_APPLICATION_YML }}" > ./bootstrap.yml +# cat bootstrap.yml # DockerHub Login - name: Docker Hub Login diff --git a/config-service/src/main/resources/bootstrap.yml b/config-service/src/main/resources/bootstrap.yml index f312c907..785bba95 100644 --- a/config-service/src/main/resources/bootstrap.yml +++ b/config-service/src/main/resources/bootstrap.yml @@ -3,9 +3,9 @@ server: spring: profiles: - active: dev + active: prod application: - name: config-service + name: config-services cloud: config: server: @@ -13,4 +13,58 @@ spring: uri: ${CONFIG_GIT_URI} ignore-local-ssh-settings: true passphrase: ${CONFIG_PASSPHRASE} - private-key: ${CONFIG_PRIVATE_KEY} + private-key: | + -----BEGIN RSA PRIVATE KEY----- + Proc-Type: 4,ENCRYPTED + DEK-Info: AES-128-CBC,58151ECC53694263F35EEA88FBFA6406 + + 2cstlc5/bYHUAJWg0PL7UbGksDp1okrJXqgBWcTqrH5qQm/iSk/LhYxF1JxGqPwt + fEWmuoGJgcJzaW80ivkBUbWUPdO5V9WHebynjFO5xUWJssGvmV4TEPGmLEKGpDSr + t1ae00AO/2YsyqTrCffDzu3S8R6A4IOSYE17Yx6P4z9xnnBJ4IG6d5Q6MVaQllMO + 7wx03NCMWLc41tQA8zWlOAC1KgIvxV7XcrbhWVQpwwQ5MD10XW6lk9UDH7Zo46Dx + na3+6mAmqZ/kIKxGF2J2TImfCWyehvo+Epw9s87snXu+XDlNMrsXLW+NJ0IQ76OS + lZPpMjJVOnB0BctF4VZuzKDYkN2/+V7BgJT/Ybc2PwhYqs9aSo083ByxcsRSY0Mh + uwW6Sxbkeo8gTzWrBvbf2XLVjhuG9fLLYR2wq5+JeEk8s1akQoYb596F3vvkzdqA + FskMhJcWi0XuE8iGn7yKj9Dh3Dhfpgp7MYvv1Ki8IZAolzOTYbXVzq4quB3RzU5t + X66bDN9Y5AKT1GBS4kkdJosef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o7uzxQigzct1TGk/rgaONMSv3fO+8vWJ0bj+TZOMwl4IAMD/QnR6a + Hkr5T8KjSeytETyoCRHcn3rUSX7SW9EPKxfI805SvkmETl5gtCWh1Ebj8KlO8KG/ + riReQi9WCOII3v4d8+m3PgDODG7uu49zKYUnnbABqER2ONp3W4IkQXUfJbY1vmZW + XvyYMOEW42ZXs58groe299LNdUG02etMPyU6vfRaFJbAWx6cv9cUuw90A2I1I9RD + CEmp0e4aLr2JHZxuCp2sR8F2he5JEMawWgwrdp+YNkeJMLq1UEgzX7pqkpvxa06a + JS3AF8O2A++BkxE8toSQb95arbaAWC0G+ZR26FwSuMVSR2SYsyPv/72CRmuLROyG + wFwfI0YMgWCHWGli8L7Nzae/aVnPpM8rxj2QXGjcN/sdUWdGDfps63/ZDLRUuUD5 + nfTYJLdW2wN67cExKjVOEJRJ01l75sCoqlZWtjuzTdoS7uFEgw9avZYtu8dqE7+R + -----END RSA PRIVATE KEY----- From 5d1043dba2425b88e0eb39840089a4e56b675686 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 15:09:02 +0900 Subject: [PATCH 19/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20private=20key=20pa?= =?UTF-8?q?th?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/bootstrap.yml | 56 +------------------ 1 file changed, 1 insertion(+), 55 deletions(-) diff --git a/config-service/src/main/resources/bootstrap.yml b/config-service/src/main/resources/bootstrap.yml index 785bba95..1e579b4a 100644 --- a/config-service/src/main/resources/bootstrap.yml +++ b/config-service/src/main/resources/bootstrap.yml @@ -13,58 +13,4 @@ spring: uri: ${CONFIG_GIT_URI} ignore-local-ssh-settings: true passphrase: ${CONFIG_PASSPHRASE} - private-key: | - -----BEGIN RSA PRIVATE KEY----- - Proc-Type: 4,ENCRYPTED - DEK-Info: AES-128-CBC,58151ECC53694263F35EEA88FBFA6406 - - 2cstlc5/bYHUA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- 7oqI8jR/+8rM2ymFG9WUDieRPmOJoU4MP58P8UQG2OrjiVfvUNlx/g4xgB92rYfV - jns/HON1U1pmMRaTS9gjnujo1Lx7PggY1uCgDt4iGtuq8PwWmZYjKDoUw3gE/Sma - qKy8ZJirRYLAN4BDuTSnb6cahtt7nB1ZiSMKy1WBSMcI1zMYGF1jpTh8Y1mnIH6r - bLa2wnmWeolxtm4D/TSTxOEedvlKqubADxgOs1lfBwuPXMHJBQurRgiYiTEtBOFK - j0pHK85nXHTuPAYyGjZTf5q4+XHLeInqOgvFJBkfzj+7aQ5NnFzA4KDHJWp+Cjsi - 45get7THkze1+8oEDI1i9CFR4lAl9aTnsoPJLG4ufKE6HZ/gM8jwbOgxUM9fzv1O - 3Jrr6Fjz7QSKajZGgJg4gzBVfhI7qMLuCYpIYb/tJ3Piwe9SjTMfJxQ02n1w9vu6 - FvWasxcPAfhf5lKRc1cojg9w+E37G9qdwWYRAKWXiL4Fctfd05uLorXDLed16Cji - bK6/6X1xyH8o7uzxQigzct1TGk/rgaONMSv3fO+8vWJ0bj+TZOMwl4IAMD/QnR6a - Hkr5T8KjSeytETyoCRHcn3rUSX7SW9EPKxfI805SvkmETl5gtCWh1Ebj8KlO8KG/ - riReQi9WCOII3v4d8+m3PgDODG7uu49zKYUnnbABqER2ONp3W4IkQXUfJbY1vmZW - XvyYMOEW42ZXs58groe299LNdUG02etMPyU6vfRaFJbAWx6cv9cUuw90A2I1I9RD - CEmp0e4aLr2JHZxuCp2sR8F2he5JEMawWgwrdp+YNkeJMLq1UEgzX7pqkpvxa06a - JS3AF8O2A++BkxE8toSQb95arbaAWC0G+ZR26FwSuMVSR2SYsyPv/72CRmuLROyG - wFwfI0YMgWCHWGli8L7Nzae/aVnPpM8rxj2QXGjcN/sdUWdGDfps63/ZDLRUuUD5 - nfTYJLdW2wN67cExKjVOEJRJ01l75sCoqlZWtjuzTdoS7uFEgw9avZYtu8dqE7+R - -----END RSA PRIVATE KEY----- + private-key-path: ${CONFIG_PRIVATE_KEY_PATH} From f36d4edf2de43ccca77dd7adee40eacb3c1fd07f Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 15:18:46 +0900 Subject: [PATCH 20/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20private=20key=20pa?= =?UTF-8?q?th?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 + docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 39970c8d..cff6c174 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -145,6 +145,7 @@ jobs: export CONFIG_GIT_URI=${{ secrets.CONFIG_GIT_URI }} export CONFIG_PASSPHRASE=${{ secrets.CONFIG_PASSPHRASE }} export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} + export CONFIG_PRIVATE_KEY_PATH = ${{ secrets.CONFIG_PRIVATE_KEY_PATH}} docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-config docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway diff --git a/docker-compose.yml b/docker-compose.yml index 8945c7cc..887e9095 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: environment: CONFIG_GIT_URI : ${CONFIG_GIT_URI} CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} -# CONFIG_PRIVATE_KEY_DIR : ${CONFIG_PRIVATE_KEY_DIR} + CONFIG_PRIVATE_KEY_PATH : ${CONFIG_PRIVATE_KEY_PATH} # restart: always restart: no volumes: From 9366c06cff60c0d6f03167018beda7a4d231b9b2 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 15:21:56 +0900 Subject: [PATCH 21/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20kafka=20server?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noti-service/src/main/resources/bootstrap.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index 1c540186..1792b7ad 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -11,7 +11,7 @@ spring: uri: http://config:8888 name: database-noti,redis kafka: - bootstrap-servers: "localhost:9092" + bootstrap-servers: "kafka:9092" eureka: From f8911f3f474d5dda7d14df1c4935c0cacaf567e0 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 15:38:34 +0900 Subject: [PATCH 22/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20private=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 2 +- config-service/src/main/resources/bootstrap.yml | 2 +- docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index cff6c174..927ff6d6 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -145,7 +145,7 @@ jobs: export CONFIG_GIT_URI=${{ secrets.CONFIG_GIT_URI }} export CONFIG_PASSPHRASE=${{ secrets.CONFIG_PASSPHRASE }} export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} - export CONFIG_PRIVATE_KEY_PATH = ${{ secrets.CONFIG_PRIVATE_KEY_PATH}} + export CONFIG_PRIVATE_KEY = ${{ secrets.CONFIG_PRIVATE_KEY}} docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-config docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway diff --git a/config-service/src/main/resources/bootstrap.yml b/config-service/src/main/resources/bootstrap.yml index 1e579b4a..f182bd93 100644 --- a/config-service/src/main/resources/bootstrap.yml +++ b/config-service/src/main/resources/bootstrap.yml @@ -13,4 +13,4 @@ spring: uri: ${CONFIG_GIT_URI} ignore-local-ssh-settings: true passphrase: ${CONFIG_PASSPHRASE} - private-key-path: ${CONFIG_PRIVATE_KEY_PATH} + private-key: ${CONFIG_PRIVATE_KEY} diff --git a/docker-compose.yml b/docker-compose.yml index 887e9095..3fd18600 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: environment: CONFIG_GIT_URI : ${CONFIG_GIT_URI} CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} - CONFIG_PRIVATE_KEY_PATH : ${CONFIG_PRIVATE_KEY_PATH} + CONFIG_PRIVATE_KEY : ${CONFIG_PRIVATE_KEY} # restart: always restart: no volumes: From 9096399b7929f194891bf1cd0bbb2efd15acf2c7 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 16:52:57 +0900 Subject: [PATCH 23/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20private=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 1 - .../src/main/resources/bootstrap.yml | 56 ++++++++++++++++++- docker-compose.yml | 2 +- 3 files changed, 56 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 927ff6d6..39970c8d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -145,7 +145,6 @@ jobs: export CONFIG_GIT_URI=${{ secrets.CONFIG_GIT_URI }} export CONFIG_PASSPHRASE=${{ secrets.CONFIG_PASSPHRASE }} export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} - export CONFIG_PRIVATE_KEY = ${{ secrets.CONFIG_PRIVATE_KEY}} docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-config docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway diff --git a/config-service/src/main/resources/bootstrap.yml b/config-service/src/main/resources/bootstrap.yml index f182bd93..785bba95 100644 --- a/config-service/src/main/resources/bootstrap.yml +++ b/config-service/src/main/resources/bootstrap.yml @@ -13,4 +13,58 @@ spring: uri: ${CONFIG_GIT_URI} ignore-local-ssh-settings: true passphrase: ${CONFIG_PASSPHRASE} - private-key: ${CONFIG_PRIVATE_KEY} + private-key: | + -----BEGIN RSA PRIVATE KEY----- + Proc-Type: 4,ENCRYPTED + DEK-Info: AES-128-CBC,58151ECC53694263F35EEA88FBFA6406 + + 2cstlc5/bYHUAJWg0PL7UbGksDp1okrJXqgBWcTqrH5qQm/iSk/LhYxF1JxGqPwt + fEWmuoGJgcJzaW80ivkBUbWUPdO5V9WHebynjFO5xUWJssGvmV4TEPGmLEKGpDSr + t1ae00AO/2YsyqTrCffDzu3S8R6A4IOSYE17Yx6P4z9xnnBJ4IG6d5Q6MVaQllMO + 7wx03NCMWLc41tQA8zWlOAC1KgIvxV7XcrbhWVQpwwQ5MD10XW6lk9UDH7Zo46Dx + na3+6mAmqZ/kIKxGF2J2TImfCWyehvo+Epw9s87snXu+XDlNMrsXLW+NJ0IQ76OS + lZPpMjJVOnB0BctF4VZuzKDYkN2/+V7BgJT/Ybc2PwhYqs9aSo083ByxcsRSY0Mh + uwW6Sxbkeo8gTzWrBvbf2XLVjhuG9fLLYR2wq5+JeEk8s1akQoYb596F3vvkzdqA + FskMhJcWi0XuE8iGn7yKj9Dh3Dhfpgp7MYvv1Ki8IZAolzOTYbXVzq4quB3RzU5t + X66bDN9Y5AKT1GBS4kkdJosefj1smXcf+4RQ8EJFQh8jHycA7hYspHzb57+vLw7+ + 3rqm7c50dlrqwjBV+GOenoIC5BT1joXeeqiBf3tQNddbxFvyMv3ZLwHvI5OdVqQ6 + cEN9nVbRG9znrYANOkl/KfdJOVTACXjSaI1N7BB4AXSL5D/eAJLcDpb5M13VlfoE + /eJspVdmJgYKqQ6t7fzt1il+YMDhgnY7JXKsNEWM/PkeDAVhf14LVT7NSYMnLMHT + hFtR6EOcwBEW8ljJxIfvScHgtPVPgVqU0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awWgwrdp+YNkeJMLq1UEgzX7pqkpvxa06a + JS3AF8O2A++BkxE8toSQb95arbaAWC0G+ZR26FwSuMVSR2SYsyPv/72CRmuLROyG + wFwfI0YMgWCHWGli8L7Nzae/aVnPpM8rxj2QXGjcN/sdUWdGDfps63/ZDLRUuUD5 + nfTYJLdW2wN67cExKjVOEJRJ01l75sCoqlZWtjuzTdoS7uFEgw9avZYtu8dqE7+R + -----END RSA PRIVATE KEY----- diff --git a/docker-compose.yml b/docker-compose.yml index 3fd18600..0104608d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -32,7 +32,7 @@ services: environment: CONFIG_GIT_URI : ${CONFIG_GIT_URI} CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} - CONFIG_PRIVATE_KEY : ${CONFIG_PRIVATE_KEY} +# CONFIG_PRIVATE_KEY : ${CONFIG_PRIVATE_KEY} # restart: always restart: no volumes: From ae9594342bb20a31c14eb34f2a08a5668baeb1fc Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 19:24:50 +0900 Subject: [PATCH 24/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20private=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.yml | 42 ++++++++++--------- noti-service/src/main/resources/bootstrap.yml | 4 +- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0104608d..f95c915a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,20 +2,12 @@ version: '3' services: -# nginx: -# container_name: nginx -# image: nginx:latest -# ports: -# - "80:80" -# volumes: -# - /home/ec2-user/nginx.conf:/etc/nginx/nginx.conf -# depends_on: -# - "db" -# restart: always #항상 재실행 - api-gateway: container_name: api-gateway - image: ${DOCKERHUB_USERNAME}/waither-gateway + image: ${DOCKERHUB_USERNAME}/waither-gateway:latest + network_mode: host + depends_on: + - config ports: - "8000:8000" # restart: always @@ -26,13 +18,15 @@ services: config: container_name: config - image: ${DOCKERHUB_USERNAME}/waither-config + image: ${DOCKERHUB_USERNAME}/waither-config:latest + network_mode: host ports: - "8888:8888" + depends_on: + - eureka environment: CONFIG_GIT_URI : ${CONFIG_GIT_URI} CONFIG_PASSPHRASE : ${CONFIG_PASSPHRASE} -# CONFIG_PRIVATE_KEY : ${CONFIG_PRIVATE_KEY} # restart: always restart: no volumes: @@ -40,7 +34,8 @@ services: eureka: container_name: eureka - image: ${DOCKERHUB_USERNAME}/waither-eureka + image: ${DOCKERHUB_USERNAME}/waither-eureka:latest + network_mode: host ports: - "8761:8761" # restart: always @@ -50,7 +45,10 @@ services: user-service: container_name: user-service - image: ${DOCKERHUB_USERNAME}/waither-user + image: ${DOCKERHUB_USERNAME}/waither-user:latest + network_mode: host + depends_on: + - config ports: - "8080:8080" # restart: unless-stopped #수동으로 중지되지 않는 이상 항상 재실행 @@ -60,17 +58,23 @@ services: weather-service: container_name: weather-service - image: ${DOCKERHUB_USERNAME}/waither-weather + image: ${DOCKERHUB_USERNAME}/waither-weather:latest + network_mode: host + depends_on: + - config ports: - "8081:8081" # restart: unless-stopped restart: no volumes: - - /home/ec2-user/logs/weather-service:/logs + - /home/ec2-user/logs/weather-service:/logs:latest noti-service: container_name: noti-service - image: ${DOCKERHUB_USERNAME}/waither-noti + image: ${DOCKERHUB_USERNAME}/waither-noti:latest + network_mode: host + depends_on: + - config ports: - "8082:8082" # restart: unless-stopped diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index 1792b7ad..a3c81bb9 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -8,10 +8,10 @@ spring: active: dev cloud: config: - uri: http://config:8888 + uri: http://localhost:8888 name: database-noti,redis kafka: - bootstrap-servers: "kafka:9092" + bootstrap-servers: "localhost:9092" eureka: From 8df16db97704ecb125a092da2cddc966ec65bf52 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 19:49:01 +0900 Subject: [PATCH 25/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20yml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apiGateway-service/src/main/resources/bootstrap.yml | 6 +++--- noti-service/src/main/resources/bootstrap.yml | 2 +- user-service/src/main/resources/bootstrap.yml | 4 ++-- weather-service/src/main/resources/bootstrap.yml | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apiGateway-service/src/main/resources/bootstrap.yml b/apiGateway-service/src/main/resources/bootstrap.yml index 49a963e2..702a9a69 100644 --- a/apiGateway-service/src/main/resources/bootstrap.yml +++ b/apiGateway-service/src/main/resources/bootstrap.yml @@ -8,10 +8,10 @@ spring: active: dev cloud: config: - uri: http://config:8888 + uri: http://localhostß:8888 name: database-apiGateway, redis, jwt kafka: - bootstrap-servers: "http://kafka:9092" + bootstrap-servers: "http://localhost:9092" consumer: group-id: "GroupId" @@ -20,7 +20,7 @@ eureka: register-with-eureka: true fetch-registry: true service-url: - defaultZone: http://eureka:8761/eureka + defaultZone: http://localhost:8761/eureka #management: # Actuator Settings # endpoints: diff --git a/noti-service/src/main/resources/bootstrap.yml b/noti-service/src/main/resources/bootstrap.yml index a3c81bb9..f16d9764 100644 --- a/noti-service/src/main/resources/bootstrap.yml +++ b/noti-service/src/main/resources/bootstrap.yml @@ -19,4 +19,4 @@ eureka: register-with-eureka: true # register to eureka server fetch-registry: true # Getting instances' information from eureka server service-url: - defaultZone : http://eureka:8761/eureka #Eureka Server's address \ No newline at end of file + defaultZone : http://localhost:8761/eureka #Eureka Server's address \ No newline at end of file diff --git a/user-service/src/main/resources/bootstrap.yml b/user-service/src/main/resources/bootstrap.yml index df14cb37..305e9c55 100644 --- a/user-service/src/main/resources/bootstrap.yml +++ b/user-service/src/main/resources/bootstrap.yml @@ -8,7 +8,7 @@ spring: active: dev cloud: config: - uri: http://config:8888 + uri: http://localhost:8888 name: database-user,redis, jwt, smtp, apiDocs-user kafka: bootstrap-servers: "localhost:9092" @@ -21,7 +21,7 @@ eureka: register-with-eureka: true # register to eureka server fetch-registry: true # Getting instances' information from eureka server service-url: - defaultZone : http://eureka:8761/eureka #Eureka Server's address + defaultZone : http://localhost:8761/eureka #Eureka Server's address #management: # Actuator # endpoints: diff --git a/weather-service/src/main/resources/bootstrap.yml b/weather-service/src/main/resources/bootstrap.yml index 0f023d22..9b2bc164 100644 --- a/weather-service/src/main/resources/bootstrap.yml +++ b/weather-service/src/main/resources/bootstrap.yml @@ -8,7 +8,7 @@ spring: active: dev cloud: config: - uri: http://config:8888 + uri: http://localhost:8888 name: database-weather kafka: bootstrap-servers: "localhost:9092" @@ -21,7 +21,7 @@ eureka: register-with-eureka: true # register to eureka server fetch-registry: true # Getting instances' information from eureka server service-url: - defaultZone : http://eureka:8761/eureka #Eureka Server's address + defaultZone : http://localhost:8761/eureka #Eureka Server's address management: # Actuator endpoints: From bc64dca0fbdbe0071b370c1a6b98391229ad8880 Mon Sep 17 00:00:00 2001 From: DDonghyeo Date: Sun, 26 May 2024 20:24:49 +0900 Subject: [PATCH 26/26] =?UTF-8?q?=F0=9F=93=9Ddocs=20:=20last=20test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cd.yml | 9 ++++++--- apiGateway-service/src/main/resources/bootstrap.yml | 2 +- docker-compose.yml | 6 ++++++ script/common.sh | 9 +++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 39970c8d..926871a5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -146,14 +146,17 @@ jobs: export CONFIG_PASSPHRASE=${{ secrets.CONFIG_PASSPHRASE }} export DOCKERHUB_USERNAME=${{ secrets.DOCKERHUB_USERNAME }} + cd /home + + docker-compose pull docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-config docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-gateway docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-noti docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-user docker pull ${{ secrets.DOCKERHUB_USERNAME }}/waither-weather - bash /home/docker_init.sh - bash /home/common.sh - bash /home/deploy.sh + bash ./docker_init.sh + bash ./common.sh + bash ./deploy.sh docker image prune -f diff --git a/apiGateway-service/src/main/resources/bootstrap.yml b/apiGateway-service/src/main/resources/bootstrap.yml index 702a9a69..7a865b57 100644 --- a/apiGateway-service/src/main/resources/bootstrap.yml +++ b/apiGateway-service/src/main/resources/bootstrap.yml @@ -8,7 +8,7 @@ spring: active: dev cloud: config: - uri: http://localhostß:8888 + uri: http://localhost:8888 name: database-apiGateway, redis, jwt kafka: bootstrap-servers: "http://localhost:9092" diff --git a/docker-compose.yml b/docker-compose.yml index f95c915a..aeb998bb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -98,3 +98,9 @@ services: KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 volumes: - /var/run/docker.sock:/var/run/docker.sock + + redis: + image: redis + container_name: redis + ports: + - "6379:6379" diff --git a/script/common.sh b/script/common.sh index 25f2e6ac..c4825a3d 100644 --- a/script/common.sh +++ b/script/common.sh @@ -3,6 +3,7 @@ RUNNING_EUREKA=$(docker ps | grep eureka) RUNNING_CONFIG=$(docker ps | grep config) RUNNING_ZOOKEEPER=$(docker ps | grep zookeeper) RUNNING_KAFKA=$(docker ps | grep kafka) +RUNNING_REDIS=$(docker ps | grep redis) # Eureka 검색 if [ -z "$RUNNING_EUREKA" ]; then @@ -22,6 +23,14 @@ else echo "Config Service is already running" fi +# Redis 검색 +if [ -z "$RUNNING_REDIS" ]; then + echo "Starting Redis ..." + docker-compose -f /home/docker-compose.yml up -d redis +else + echo "Redis is already running" +fi + # Zookeeper 검색 if [ -z "$RUNNING_ZOOKEEPER" ]; then echo "Starting Zookeeper ..."