Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] refactor: 서브모듈 위치 변경 및 경로 변경 (#826) #827

Merged
merged 7 commits into from
Apr 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 15 additions & 13 deletions .github/workflows/cd-back-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
push:
branches:
- dev
paths: 'backend/**'
paths:
- 'backend/**'
workflow_dispatch:

concurrency:
Expand Down Expand Up @@ -37,22 +38,23 @@ jobs:
- name: bootJar with gradle
run: ./gradlew bootJar

# 2023-11-23 기준 EC2 프리티어 사용으로 인해 DEV 환경을 PROD 환경에서 실행함
- name: deploy use scp
uses: appleboy/scp-action@master
- name: Docker Login
uses: docker/[email protected]
with:
host: ${{secrets.FESTAGO_PROD_IP}}
username: ${{secrets.FESTAGO_PROD_USERNAME}}
key: ${{secrets.FESTAGO_SSH_KEY}}
source: "./backend/build/libs/*.jar"
target: ${{ vars.FESTAGO_PROD_JAR_DIR }}
strip_components: 3
username: ${{ vars.DOCKER_HUB_DEV_USERNAME }}
password: ${{ secrets.DOCKER_HUB_DEV_LOGIN_TOKEN }}

- name: Build Docker images
run: docker build -t ${{ vars.DOCKER_DEV_TAG }} .

- name: Push Docker images
run: docker push ${{ vars.DOCKER_DEV_TAG }}

- name: run application use ssh
uses: appleboy/ssh-action@master
with:
host: ${{secrets.FESTAGO_PROD_IP}}
username: ${{secrets.FESTAGO_PROD_USERNAME}}
key: ${{secrets.FESTAGO_SSH_KEY}}
host: ${{ vars.FESTAGO_DEV_IP }}
username: ${{ vars.FESTAGO_DEV_USERNAME }}
key: ${{secrets.FESTAGO_DEV_SSH_KEY}}
script_stop: true
script: ${{ vars.FESTAGO_DEV_DEPLOY_COMMAND }}
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "backend/src/main/resources/festago-config"]
path = backend/src/main/resources/festago-config
[submodule "backend/src/main/resources/config"]
path = backend/src/main/resources/config
url = https://github.com/festago/festago-config.git
4 changes: 4 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM openjdk:17-jdk
ARG JAR_FILE_PATH=./build/libs/*.jar
COPY ${JAR_FILE_PATH} app.jar
ENTRYPOINT ["java", "-jar", "-Duser.timezone=Asia/Seoul", "app.jar"]
5 changes: 0 additions & 5 deletions backend/src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
spring:
profiles:
active: local
config:
import:
- classpath:/festago-config/backend/application-dev.yml
- classpath:/festago-config/backend/application-prod.yml
- classpath:/festago-config/backend/application-infra.yml
1 change: 1 addition & 0 deletions backend/src/main/resources/config
Submodule config added at 2ecee3
1 change: 0 additions & 1 deletion backend/src/main/resources/festago-config
Submodule festago-config deleted from 691d66
Loading