🚀 Docker compose edu test
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
# docker run --name egov-config -d -p 8888:8888 -e profile=prod -e ENCRYPT_KEY=??? egovframework/egov-config
|
||||
# base image - openjdk8
|
||||
FROM openjdk:8-jre-alpine
|
||||
|
||||
# directory 생성
|
||||
RUN mkdir -p /usr/app/config
|
||||
# jar 파일이 복사되는 위치
|
||||
ENV APP_HOME=/usr/app/
|
||||
# 작업 시작 위치
|
||||
@@ -10,4 +13,4 @@ COPY build/libs/*.jar config.jar
|
||||
# application port
|
||||
EXPOSE 8888
|
||||
# 실행
|
||||
CMD ["java", "-Dspring.profiles.active=${profile:native}", "-jar", "config.jar"]
|
||||
CMD ["java", "-Dsearch.location=/usr/app/config", "-jar", "config.jar"]
|
||||
|
||||
@@ -10,7 +10,8 @@ spring:
|
||||
config:
|
||||
server:
|
||||
native:
|
||||
search-locations: file:///usr/app/config # docker
|
||||
search-locations: ${search.location:file:///${user.home}/workspace.edu/egovframe-msa-edu/config} # Windows
|
||||
# search-locations: file://${user.home}/workspace.edu/egovframe-msa-edu/config # MacOS
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
port: 5672
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
encrypt:
|
||||
key: egovframe # 대칭키 임의의 값
|
||||
key: egovframe # 대칭키 임의의 값
|
||||
@@ -14,8 +14,8 @@
|
||||
</root>
|
||||
</springProfile>
|
||||
<springProfile name="!native">
|
||||
<!-- java -Ddestination="localhost:5001" 와 같이 변경할 수 있다. cf 환경에서는 manifest.yml 파일에 환경변수로 추가 -->
|
||||
<property name="destination" value="${destination:-localhost:5001}" />
|
||||
<!-- java -Dlogstash_hostname="localhost:5001" 와 같이 변경할 수 있다. cf 환경에서는 manifest.yml 파일에 환경변수로 추가 -->
|
||||
<property name="destination" value="${logstash_hostname:-localhost:5001}" />
|
||||
<property name="app_name" value="${app_name:-config-server}" />
|
||||
|
||||
<!-- ELK - Logstash 로 로그를 전송하기 위한 appender -->
|
||||
|
||||
Reference in New Issue
Block a user