Skip to content
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
9 changes: 6 additions & 3 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
version: '3.8'

name: climingo-dev

services:
climingo-api:
image: climingo/climingo-dev:${TAG} # Spring Boot 애플리케이션 Docker 이미지
Expand All @@ -8,11 +10,12 @@ services:
- JASYPT_PASSWORD=${JASYPT_PASSWORD}
- VERSION=${TAG}
- BUILDTIME=${BUILDTIME}
- SPRING_PROFILES_ACTIVE=dev
- LOGGING_FILE_PATH=/logs/dev # 로그 파일 경로를 환경 변수로 설정
volumes:
- ./logs:/logs/dev # 호스트와 컨테이너 간 로그 파일 공유
ports:
- "8080:8080"
- "8081:8080"
logging: # 로그 드라이버 설정 (json-file 기본값 사용)
driver: "json-file"
options:
Expand All @@ -25,7 +28,7 @@ services:
image: grafana/promtail:2.9.0 # Promtail Docker 이미지
container_name: promtail
ports:
- "9080:9080"
- "9081:9080"
depends_on:
- climingo-api # Spring Boot 애플리케이션이 먼저 실행되도록 설정
volumes:
Expand All @@ -37,4 +40,4 @@ services:

networks:
climingo-network:
external: true
external: true
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
version: '3.8'

name: climingo-prod

services:
climingo-api:
image: climingo/climingo:${TAG} # Spring Boot 애플리케이션 Docker 이미지
Expand All @@ -8,6 +10,7 @@ services:
- JASYPT_PASSWORD=${JASYPT_PASSWORD}
- VERSION=${TAG}
- BUILDTIME=${BUILDTIME}
- SPRING_PROFILES_ACTIVE=prod
- LOGGING_FILE_PATH=/logs/prod # 로그 파일 경로를 환경 변수로 설정
volumes:
- ./logs:/logs/prod # 호스트와 컨테이너 간 로그 파일 공유
Expand Down
12 changes: 6 additions & 6 deletions src/main/resources/application-dev.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

spring:
datasource: # TODO MySQL로 변경
driver-class-name: org.h2.Driver
username: sa
password:
url: jdbc:h2:mem:test
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ENC(0SGAt9P1xWJfHb1kiYhIWMqmpummGoSoO1ni07GP/6gy8FfSWr2DgDfKpfRJsBLm96azNXwcnxY5Git6+i/XftOP6zqGgN7ZrTvoUspF0mkSCzwEJPyZ6DVBSUfCYEYy/xxrpo5QB50LKY2wOe0jfNB+k19dTwpPuGmK0rT1vHc=)
username: ENC(/hDIlwiiOpd1p7Coppl9L4xHYDjkf9cj)
password: ENC(Toy+1i51hX5nGADpusirW4loTpskgy4o)
h2:
console:
enabled: true
path: /h2-console
jpa:
hibernate:
ddl-auto: create # TODO 운영 환경시 변경 필요
ddl-auto: validate
properties:
hibernate:
show_sql: true
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ spring:
console:
enabled: false
jpa:
hibernate:
ddl-auto: validate
properties:
hibernate:
show_sql: false
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ spring:
local: local
dev: dev
prod: prod
active: prod
active: local

servlet:
multipart:
Expand Down
Loading