Skip to content

Commit

Permalink
feat: 서버 도메인 이름 변수화, 이미지 저장소와 도커 볼륨 연동
Browse files Browse the repository at this point in the history
  • Loading branch information
lja3723 committed Nov 12, 2024
1 parent c3c8c58 commit 92ef948
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ env:
DATASOURCE_PASSWORD : ${{ sccrets.ENV_DATASOURCE_PASSWORD }}
GOOGLE_CLIENT_ID : ${{ secrets.ENV_GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.ENV_GOOGLE_CLIENT_SECRET }}
GOOGLE_REDIRECT_URI : ${{ secrets.ENV_GOOGLE_REDIRECT_URI }}
IMAGE_UPLOAD_PATH : ${{ secrets.ENV_IMAGE_UPLOAD_PATH }}
JWT_SECRET : ${{ secrets.ENV_JWT_SECRET }}
KAKAO_CLIENT_ID : ${{ secrets.ENV_KAKAO_CLIENT_ID }}
KAKAO_CLIENT_SECRET : ${{ secrets.ENV_KAKAO_CLIENT_SECRET }}
KAKAO_REDIRECT_URI : ${{ secrets.ENV_KAKAO_REDIRECT_URI }}
KAKAOPAY_SECRET_KEY : ${{ secrets.ENV_KAKAOPAY_SECRET_KEY }}
SERVER_DOMAIN_NAME : ${{ secrets.ENV_SERVER_DOMAIN_NAME }}

jobs:
## 1단계: 프로젝트 빌드
Expand Down Expand Up @@ -143,12 +143,12 @@ jobs:
echo "DATASOURCE_PASSWORD=${{ sccrets.ENV_DATASOURCE_PASSWORD }}" >> ~/.env
echo "GOOGLE_CLIENT_ID=${{ secrets.ENV_GOOGLE_CLIENT_ID }}" >> ~/.env
echo "GOOGLE_CLIENT_SECRET=${{ secrets.ENV_GOOGLE_CLIENT_SECRET }}" >> ~/.env
echo "GOOGLE_REDIRECT_URI=${{ secrets.ENV_GOOGLE_REDIRECT_URI }}" >> ~/.env
echo "JWT_SECRET=${{ secrets.ENV_JWT_SECRET }}" >> ~/.env
echo "IMAGE_UPLOAD_PATH=${{ secrets.ENV_IMAGE_UPLOAD_PATH }}" >> ~/.env
echo "KAKAO_CLIENT_ID=${{ secrets.ENV_KAKAO_CLIENT_ID }}" >> ~/.env
echo "KAKAO_CLIENT_SECRET=${{ secrets.ENV_KAKAO_CLIENT_SECRET }}" >> ~/.env
echo "KAKAO_REDIRECT_URI=${{ secrets.ENV_KAKAO_REDIRECT_URI }}" >> ~/.env
echo "KAKAOPAY_SECRET_KEY=${{ secrets.ENV_KAKAOPAY_SECRET_KEY }}" >> ~/.env
echo "SERVER_DOMAIN_NAME=${{ secrets.ENV_SERVER_DOMAIN_NAME }}" >> ~/.env
echo "Environment setup has been completed."
- name: Pull New Docker Image
Expand Down Expand Up @@ -179,7 +179,7 @@ jobs:
key: ${{ secrets.SSH_PRIVATE_KEY }}
port: ${{ secrets.SSH_PORT }}
envs: GITHUB_SHA
script: sudo docker run --rm -d -p 80:8080 --env-file ~/.env --name would-you-in ${{ secrets.DOCKER_REPO_FULLNAME }}
script: sudo docker run --rm -d -p 80:8080 --env-file ~/.env --name would-you-in -v would-you-in-image-volume:${{ secrets.ENV_IMAGE_UPLOAD_PATH }} ${{ secrets.DOCKER_REPO_FULLNAME }}

- name: Clean-Up Docker Image
uses: appleboy/ssh-action@master
Expand Down
18 changes: 9 additions & 9 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ logging.level.org.ktc2.cokaen.wouldyouin: debug

# for image storage path
image:
api-url: http://52.78.71.136/api/images
api-url: ${SERVER_DOMAIN_NAME}/api/images
upload:
parent-path: src/main/resources/static/images
parent-path: ${IMAGE_UPLOAD_PATH}
curation:
child-path: curation
member:
Expand Down Expand Up @@ -74,7 +74,7 @@ oauth:
client:
id: ${KAKAO_CLIENT_ID}
secret: ${KAKAO_CLIENT_SECRET}
redirect_uri: ${KAKAO_REDIRECT_URI}
redirect_uri: ${SERVER_DOMAIN_NAME}/api/auth/social/redirect/kakao
google:
uri:
login:
Expand All @@ -86,14 +86,14 @@ oauth:
client:
id: ${GOOGLE_CLIENT_ID}
secret: ${GOOGLE_CLIENT_SECRET}
redirect_uri: ${GOOGLE_REDIRECT_URI}
redirect_uri: ${SERVER_DOMAIN_NAME}/api/auth/social/redirect/google
scope:
- email
- profile
payment:
"approval_url": "http://localhost:8080/api/events"
"cancel_url": "http://localhost:8080/api/events"
"fail_url": "http://localhost:8080/api/events"
"approval_url": ${SERVER_DOMAIN_NAME}/api/events
"cancel_url": ${SERVER_DOMAIN_NAME}/api/events
"fail_url": ${SERVER_DOMAIN_NAME}/api/events
"secret_key": ${KAKAOPAY_SECRET_KEY}
"kakao_pay_single_payment_url": "online/v1/payment/ready"
"kakao-pay-request-host": "https://open-api.kakaopay.com"
"kakao_pay_single_payment_url": online/v1/payment/ready
"kakao-pay-request-host": https://open-api.kakaopay.com

0 comments on commit 92ef948

Please sign in to comment.