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

[ADD] Applicaton.yml 파일로 profile 설정 추가 #10

Merged
merged 3 commits into from
Dec 26, 2023
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
16 changes: 16 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,22 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-

# 프로젝트 저장소에 업로드하면 안되는 설정 파일들을 만들어줍니다.
- name: Make application.yml
run: |
# src/main 으로 경로를 이동합니다.
cd ./src/main
# src/main 경로에 resources 폴더를 만들어줍니다.
mkdir resources
cd ./resources
# 필요한 yml 파일들을 만들어줍니다.
touch ./application-dev.yml
# 등록해둔 Github Secrets의 내용을 이용해서 yml 파일의 내용을 써줍니다.
echo "$APPLICATION_DEV" > ./application-dev.yml
env:
APPLICATION_DEV: ${{ secrets.APPLICATION_DEV }}
shell: bash

- name: Gradle 권한 부여
run: chmod +x gradlew

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,4 +178,4 @@ replay_pid*
# End of https://www.toptal.com/developers/gitignore/api/intellij,java

/src/main/resources
application.properties
.gradle
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ARG JAR_FILE=*.jar
### JAR_FILE 경로에 해당하는 파일을 Docker 이미지 내부로 복사한다.
COPY ${JAR_FILE} meeteam.jar
### Docker 컨테이너가 시작될 때 실행할 명령을 지정한다.
ENTRYPOINT ["java","-jar","meeteam.jar"]
ENTRYPOINT ["java","-jar","-Dspring.profiles.active=dev","meeteam.jar"]
2 changes: 1 addition & 1 deletion docker/docker-compose.blue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ services:
build: .
# 호스트의 8081 포트와 컨테이너의 80 포트를 매핑
ports:
- "8081:80"
- "8081:8080"
# 컨테이너의 이름
container_name: spring-blue
2 changes: 1 addition & 1 deletion docker/docker-compose.green.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ services:
backend:
build: .
ports:
- "8082:80"
- "8082:8080"
container_name: spring-green
Loading