Skip to content

Commit

Permalink
chore: config server 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ddolboghi committed Jun 11, 2024
1 parent 2aada82 commit 94dd8a4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ jobs:
java-version: '17'
distribution: 'temurin'

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set environment variables
run: |
echo "CONFIG_SERVER_URL=${{secrets.CONFIG_SERVER_URL}}" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Substitute variables in application.yml
run: |
apt-get update && apt-get install -y gettext-base
envsubst < src/main/resources/application.yml > src/main/resources/application.yml.temp
mv src/main/resources/application.yml.temp src/main/resources/application.yml
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand All @@ -49,7 +53,10 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Build docker image
run: docker buildx build --platform linux/amd64,linux/arm64 -t ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:latest --push -f Dockerfile .
run: docker build --build-arg KAFKA_BOOTSTRAP_SERVERS=${{ secrets.KAFKA_BOOTSTRAP_SERVERS }} -t ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:latest -f Dockerfile .

- name: Push docker hub
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/eureka-server:latest

run-docker-image-on-ec2:
needs: build-docker-image
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
spring:
config:
import: optional:configserver:http://52.79.127.196:8071
import: optional:configserver:${CONFIG_SERVER_URL}

0 comments on commit 94dd8a4

Please sign in to comment.