-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from one-dream-us/dev
뉴스 콘텐츠 상세 조회 에러 수정 & GIthubActions CI/CD 추가
- Loading branch information
Showing
9 changed files
with
93 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Thisismoney deployment actions | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build-project: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'temurin' | ||
|
||
# Configure Gradle for optimal use in GiHub Actions, including caching of downloaded dependencies. | ||
# See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md | ||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0 | ||
|
||
- name: Set config file | ||
run: | | ||
echo "${{secrets.APPLICATION_YML}}" | base64 --decode > src/main/resources/application.yml | ||
- name: Build with Gradle Wrapper | ||
run: ./gradlew build -x test | ||
# - name: ls -al | ||
# run: ls -al | ||
# - name: check build file | ||
# run: | | ||
# cd build/libs/ | ||
# ls -al | ||
- name: Build docker image | ||
run: | | ||
docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}} | ||
docker buildx build --platform linux/amd64 -t ${{secrets.DOCKER_USER}}/thisismoney-app . | ||
docker push ${{secrets.DOCKER_USER}}/thisismoney-app:latest | ||
- name: Excute remote ssh commands & Run App | ||
uses: appleboy/ssh-action@v0.1.6 # ssh 접속하는 오픈소스 | ||
with: | ||
host: ${{ secrets.EC2_HOST }} # 인스턴스 IP | ||
username: ${{ secrets.EC2_USER_NAME}} # 우분투 아이디 | ||
key: ${{ secrets.PRIVATE_KEY }} # ec2 instance pem key | ||
script: | # 실행할 스크립트 | ||
docker login -u ${{secrets.DOCKER_USER}} -p ${{secrets.DOCKER_PASSWORD}} | ||
cd ~/thisismoney | ||
docker-compose down | ||
docker rmi ${{secrets.DOCKER_USER}}/thisismoney-app | ||
docker-compose pull | ||
docker-compose up -d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -255,6 +255,7 @@ gradle-app.setting | |
.env | ||
|
||
application-dev.yml | ||
application-deploy.yml | ||
|
||
Todo.md | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,3 @@ | ||
spring: | ||
application: | ||
name: thisismoney | ||
|
||
datasource: | ||
url: ${DB_URL} | ||
username: ${DB_USERNAME} | ||
password: ${DB_PASSWORD} | ||
driver-class-name: org.postgresql.Driver | ||
|
||
jpa: | ||
hibernate: | ||
ddl-auto: update | ||
# show-sql: true | ||
# properties: | ||
# hibernate: | ||
# format_sql: true | ||
|
||
security: | ||
oauth2: | ||
client: | ||
provider: | ||
kakao: | ||
authorization-uri: ${KAKAO_AUTHORIZATION_URI} # 인가 코드 받기 URL | ||
token-uri: ${KAKAO_TOKEN_URI} # 토큰 받기 URL | ||
user-info-uri: ${KAKAO_USER_INFO_URI} # 유저 정보 받기 URL | ||
user-name-attribute: id | ||
registration: | ||
kakao: | ||
client-id: ${KAKAO_CLIENT_ID} | ||
admin-key: 2eae9fe406f06f04c904c133737c7ff0 | ||
client-server: # seucurity id | ||
client-authentication-method: ${KAKAO_CLIENT_AUTHENTICATION_METHOD} | ||
redirect-uri: ${KAKAO_REDIRECT_URI} | ||
authorization-grant-type: ${KAKAO_AUTHORIZATION_GRANT_TYPE} | ||
client-name: kakao | ||
scope: | ||
- profile_nickname | ||
- account_email | ||
|
||
jwt: | ||
secret-key: ${JWT_SECRET_KEY} | ||
cookie: | ||
domain: | ||
server: thisismoney.site | ||
local: localhost | ||
project: name |