Skip to content

Commit

Permalink
Merge pull request #4 from SunjooAI/yerim
Browse files Browse the repository at this point in the history
[FIX] 설정파일 수정
  • Loading branch information
SunYerim authored Jun 30, 2024
2 parents eaca0ad + 046bf5d commit 5be0de7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew build --no-daemon
run: ./gradlew build

- name: Log in to Docker Hub
uses: docker/login-action@v3
Expand All @@ -34,8 +34,8 @@ jobs:

- name: Build and push Docker image
run: |
docker build -t ${{ secrets.DOCKER_USERNAME }}/gateway .
docker push ${{ secrets.DOCKER_USERNAME }}/gateway
docker build -t ${{ secrets.DOCKER_USERNAME }}/gateway:latest .
docker push ${{ secrets.DOCKER_USERNAME }}/gateway:latest
- name: Deploy to EC2
uses: appleboy/[email protected]
Expand All @@ -47,6 +47,8 @@ jobs:
script: |
cd /home/ubuntu/sunjoo-server-gateway
docker-compose down
git pull origin main
docker pull ${{ secrets.DOCKER_USERNAME }}/gateway:latest
docker-compose up -d --build
docker-compose build
docker-compose up -d
docker network connect eureka-network sunjoo-server-gateway-gateway-1
docker restart sunjoo-server-gateway-gateway-1
10 changes: 6 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spring:
cloud:
config:
enabled: false

gateway:
globalcors:
corsConfigurations:
Expand All @@ -37,17 +38,17 @@ spring:
- Authorization
routes:
- id: auth
uri: http://sunjoo-server-auth-spring-1:8090/
uri: http://13.124.194.48:8090/
predicates:
- Path=/auth/**
- id: analyze
uri: http://sunjoo-server-sentimentanalysis-sentimentAnalysis-1:8095/
uri: http://13.124.194.48:8095/
predicates:
- Path=/analyze/**
filters:
- name: AuthorizationHeaderFilter
- id: drinktionary
uri: http://sunjoo-server-drinktionary-drinktionary-1:8091/
uri: http://13.124.194.48:8091/
predicates:
- Path=/drinks/**
filters:
Expand All @@ -60,4 +61,5 @@ eureka:
register-with-eureka: true
fetch-registry: true
service-url:
defaultZone: http://sunjoo-server-eureka-eureka-1:8761/eureka/
defaultZone: http://13.124.194.48:8761/eureka/

0 comments on commit 5be0de7

Please sign in to comment.