Skip to content

Commit

Permalink
✨feature : prod 배포설정
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkYunHo committed Jul 23, 2023
1 parent 37bc9b8 commit 6eb59be
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 3 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci-batch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#name: ci-batch
#
#on:
# workflow_dispatch:
# inputs:
# job_name:
# required: true
# type: string
# description: 실행할 job 명칭 input
#
#jobs:
# ci-batch:
# runs-on: ubuntu-latest
# steps:
# - name: Git Checkout
# uses: actions/checkout@v2
#
# - name: Setup JDK
# uses: actions/setup-java@v1
# with:
# java-version: 17
#
# - name: Grant execute permission for gradlew
# run: chmod +x gradlew
#
# - name: Build Gradle
# run:
#
# - name: Dockerhub Login
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
#
# - name: Build Gradle with JIB (API)
# run: ./gradlew clean --stacktrace --build-file=./batch/build.gradle.kts --Dspring.profiles.active=prod --job.name=${{ github.event.inputs.job_name }} build
#
## - name: Execute Remote SSH & Deploy 'API' module
## uses: appleboy/ssh-action@master
## with:
## host: ${{ secrets.REMOTE_SSH_HOST }}
## username: ${{ secrets.REMOTE_SSH_USERNAME }}
## key: ${{ secrets.REMOTE_SSH_KEY }}
## script: |
## docker pull johnpark0921/lotto-portfolio
## docker container run --name lotto-portfolio -p 8080:8080 johnpark0921/lotto-portfolio
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
tags:
- 'v**'

# TODO:
# - gitaction에서 SSH 방식으로 인스턴스 접근해서 image pull & docker run 해보기 - https://doooodle932.tistory.com/163
# - 수동으로 gitaction 돌릴 수 있도록 설정, if문 설정하면 될듯 (api, batch 별도 배포를 위해) - https://velog.io/@gidskql6671/Github-Actions-Job%EB%93%A4%EC%9D%98-%EC%8B%A4%ED%96%89-%EC%88%9C%EC%84%9C-%EC%A0%95%ED%95%B4%EC%A3%BC%EA%B8%B0
jobs:
ci:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jib {
jvmFlags = listOf(
"-Dsun.net.inetaddr.ttl=0", // DNS cache TTL
"-XX:+PrintCommandLineFlags", // Print JVM Flags
"-Dspring.profiles.active=prod" // profile 설정
)
}
}
Expand Down

0 comments on commit 6eb59be

Please sign in to comment.