🔧 Test docker compose
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
# openjdk8 base image
|
||||
FROM openjdk:8-jre-alpine
|
||||
|
||||
# config server uri: dockder run --e 로 변경 가능
|
||||
ENV SPRING_CLOUD_CONFIG_URI https://egov-config.paas-ta.org
|
||||
RUN mkdir -p /usr/app/msa-attach-volume/messages
|
||||
# jar 파일이 복사되는 위치
|
||||
ENV APP_HOME=/usr/app/
|
||||
# 작업 시작 위치
|
||||
@@ -11,5 +10,5 @@ WORKDIR $APP_HOME
|
||||
COPY build/libs/*.jar apigateway.jar
|
||||
# application port
|
||||
EXPOSE 8000
|
||||
# 실행 (application-cf.yml 프로필이 기본값)
|
||||
CMD ["java", "-Dspring.profiles.active=${profile:cf}", "-jar", "apigateway.jar"]
|
||||
# 실행
|
||||
CMD ["java", "-Dspring.profiles.active=${profile:default}", "-jar", "apigateway.jar"]
|
||||
|
||||
@@ -10,7 +10,7 @@ applications:
|
||||
- egov-discovery-provided-service # discovery service binding
|
||||
env:
|
||||
spring_profiles_active: cf
|
||||
spring_cloud_config_uri: https://egov-config.paas-ta.org
|
||||
spring_cloud_config_uri: http://localhost:8888
|
||||
app_name: egov-apigateway # logstash custom app name
|
||||
TZ: Asia/Seoul
|
||||
JAVA_OPTS: -Xss349k
|
||||
|
||||
@@ -36,7 +36,7 @@ import java.nio.file.Paths;
|
||||
@Configuration
|
||||
public class MessageSourceConfig {
|
||||
|
||||
@Value("${messages.directory}")
|
||||
@Value("${messages.directory:${user.home}/msa-attach-volume/messages}")
|
||||
private String messagesDirectory;
|
||||
|
||||
@Value("${spring.profiles.active:default}")
|
||||
|
||||
@@ -65,3 +65,6 @@ management:
|
||||
web:
|
||||
exposure:
|
||||
include: refresh, health, beans
|
||||
|
||||
messages:
|
||||
directory: ${user.dir}/msa-attach-volume/messages
|
||||
|
||||
@@ -2,4 +2,5 @@ spring:
|
||||
cloud:
|
||||
config:
|
||||
uri: http://localhost:8888
|
||||
name: apigateway
|
||||
name: application
|
||||
enabled: true
|
||||
|
||||
Reference in New Issue
Block a user