Skip to content

Commit 9520bce

Browse files
committed
update: config service docker ip
1 parent 8e4e337 commit 9520bce

File tree

2 files changed

+82
-82
lines changed

2 files changed

+82
-82
lines changed
Lines changed: 81 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,81 @@
1-
name: GOGO Stage stage CD Workflow
2-
3-
on:
4-
push:
5-
branches:
6-
- 'develop'
7-
workflow_dispatch:
8-
9-
jobs:
10-
CI:
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v3
16-
17-
- name: Set up JDK 17
18-
uses: actions/setup-java@v3
19-
with:
20-
java-version: '17'
21-
distribution: 'temurin'
22-
cache: gradle
23-
24-
- name: Setup Gradle
25-
uses: gradle/gradle-build-action@v2
26-
27-
- name: Setup Gradle's permission
28-
run: chmod +x gradlew
29-
30-
- name: Build with Gradle
31-
run: ./gradlew clean build
32-
33-
deploy:
34-
runs-on: ubuntu-latest
35-
needs: CI
36-
steps:
37-
- name: Checkout code
38-
uses: actions/checkout@v3
39-
40-
- name: Install sshpass
41-
run: sudo apt-get update && sudo apt-get install -y sshpass
42-
43-
- name: SSH Command to Deploy using Password
44-
run: |
45-
sshpass -p "${{ secrets.SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
46-
mkdir -p /home/ubuntu/gogo-stage
47-
cd /home/ubuntu/gogo-stage
48-
49-
if [ ! -d ".git" ]; then
50-
git clone -b develop https://github.com/team-gogo/gogo-stage.git .
51-
else
52-
git pull origin develop
53-
fi
54-
55-
./gradlew build
56-
57-
docker build -f DockerFileStage -t gogo-stage-stage .
58-
59-
docker stop gogo-stage-stage || true
60-
docker rm gogo-stage-stage || true
61-
62-
docker run -d -p 8082:8082 --name gogo-stage-stage gogo-stage-stage
63-
EOF
64-
65-
- name: SSH Success Notification
66-
if: success()
67-
uses: sarisia/actions-status-discord@v1
68-
with:
69-
webhook: ${{ secrets.DISCORD_WEBHOOK }}
70-
color: 0x4CAF50
71-
title: "배포 성공"
72-
message: "GOGO Stage stage deployment completed successfully."
73-
74-
- name: SSH Failure Notification
75-
if: failure()
76-
uses: sarisia/actions-status-discord@v1
77-
with:
78-
webhook: ${{ secrets.DISCORD_WEBHOOK }}
79-
color: 0xFF4C4C
80-
title: "배포 실패"
81-
message: "GOGO Stage stage deployment failed. Check the logs for details."
1+
#name: GOGO Stage stage CD Workflow
2+
#
3+
#on:
4+
# push:
5+
# branches:
6+
# - 'develop'
7+
# workflow_dispatch:
8+
#
9+
#jobs:
10+
# CI:
11+
# runs-on: ubuntu-latest
12+
#
13+
# steps:
14+
# - name: Checkout code
15+
# uses: actions/checkout@v3
16+
#
17+
# - name: Set up JDK 17
18+
# uses: actions/setup-java@v3
19+
# with:
20+
# java-version: '17'
21+
# distribution: 'temurin'
22+
# cache: gradle
23+
#
24+
# - name: Setup Gradle
25+
# uses: gradle/gradle-build-action@v2
26+
#
27+
# - name: Setup Gradle's permission
28+
# run: chmod +x gradlew
29+
#
30+
# - name: Build with Gradle
31+
# run: ./gradlew clean build
32+
#
33+
# deploy:
34+
# runs-on: ubuntu-latest
35+
# needs: CI
36+
# steps:
37+
# - name: Checkout code
38+
# uses: actions/checkout@v3
39+
#
40+
# - name: Install sshpass
41+
# run: sudo apt-get update && sudo apt-get install -y sshpass
42+
#
43+
# - name: SSH Command to Deploy using Password
44+
# run: |
45+
# sshpass -p "${{ secrets.SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} << 'EOF'
46+
# mkdir -p /home/ubuntu/gogo-stage
47+
# cd /home/ubuntu/gogo-stage
48+
#
49+
# if [ ! -d ".git" ]; then
50+
# git clone -b develop https://github.com/team-gogo/gogo-stage.git .
51+
# else
52+
# git pull origin develop
53+
# fi
54+
#
55+
# ./gradlew build
56+
#
57+
# docker build -f DockerFileStage -t gogo-stage-stage .
58+
#
59+
# docker stop gogo-stage-stage || true
60+
# docker rm gogo-stage-stage || true
61+
#
62+
# docker run -d -p 8082:8082 --name gogo-stage-stage gogo-stage-stage
63+
# EOF
64+
#
65+
# - name: SSH Success Notification
66+
# if: success()
67+
# uses: sarisia/actions-status-discord@v1
68+
# with:
69+
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
70+
# color: 0x4CAF50
71+
# title: "배포 성공"
72+
# message: "GOGO Stage stage deployment completed successfully."
73+
#
74+
# - name: SSH Failure Notification
75+
# if: failure()
76+
# uses: sarisia/actions-status-discord@v1
77+
# with:
78+
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
79+
# color: 0xFF4C4C
80+
# title: "배포 실패"
81+
# message: "GOGO Stage stage deployment failed. Check the logs for details."

src/main/resources/application.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ spring:
1717
config:
1818
activate:
1919
on-profile: stage
20-
import: "optional:configserver:http://172.17.0.2:8888/"
20+
import: "optional:configserver:http://host.docker.internal:8888/"

0 commit comments

Comments
 (0)