diff --git a/backend/discovery/src/main/resources/application.yml b/backend/discovery/src/main/resources/application.yml index 9312ccc..aa92c9d 100644 --- a/backend/discovery/src/main/resources/application.yml +++ b/backend/discovery/src/main/resources/application.yml @@ -15,6 +15,6 @@ eureka: register-with-eureka: false fetch-registry: false service-url: - defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@localhost:8761/eureka + defaultZone: http://${spring.security.user.name}:${spring.security.user.password}@${eureka.instance.hostname:localhost}:8761/eureka server: peer-node-read-timeout-ms: 10000 \ No newline at end of file diff --git a/config/application.yml b/config/application.yml index ba4b8ad..af563ea 100644 --- a/config/application.yml +++ b/config/application.yml @@ -12,7 +12,7 @@ eureka: register-with-eureka: true # eureka 서버에 등록 fetch-registry: true # 외부 검색 가능 service-url: - defaultZone: http://admin:admin@localhost:8761/eureka + defaultZone: http://admin:admin@${eureka.instance.hostname:localhost}:8761/eureka # file attach location - messages{lang}.properties 도 이 경로에 위치한다. file: diff --git a/docker-compose/app/mesh/docker-compose.yml b/docker-compose/app/mesh/docker-compose.yml index e555fda..7799582 100644 --- a/docker-compose/app/mesh/docker-compose.yml +++ b/docker-compose/app/mesh/docker-compose.yml @@ -1,52 +1,43 @@ version: '3' services: - egov-config: - container_name: egov-config - hostname: egov-config + config: + container_name: config image: egovframe/msa-edu-config:latest ports: - "8888:8888" - # restart: always - # networks: - # - egov-network + restart: always volumes: - ${HOME}/workspace/egovframe-msa-edu/config:/usr/app/config # volume bind environment: ENCRYPT_KEY: token_secret TZ: Asia/Seoul - egov-discovery: - container_name: egov-discovery + discovery: + container_name: discovery image: egovframe/msa-discovery:latest ports: - "8761:8761" - # restart: always - # networks: - # - egov-network + restart: always environment: SPRING_PROFILES_ACTIVE: default + EUREKA_INSTANCE_HOSTNAME: discovery TZ: Asia/Seoul - egov-apigateway: - container_name: egov-apigateway + apigateway: + container_name: apigateway image: egovframe/msa-apigateway:latest ports: - "8000:8000" restart: on-failure - # networks: - # - egov-network volumes: - ${HOME}/workspace:/usr/app/msa-attach-volume environment: - SPRING_CLOUD_CONFIG_URI: "egov-config:8888" + SPRING_CLOUD_CONFIG_URI: http://config:8888 SPRING_PROFILES_ACTIVE: default + EUREKA_INSTANCE_HOSTNAME: discovery TZ: Asia/Seoul depends_on: - - egov-config - # links: - # - egov-config - # healthcheck: - # test: ["CMD", "curl", "-f", "egov-config:8888"] + - config rabbitmq: container_name: rabbitmq @@ -55,8 +46,6 @@ services: - "5672:5672" - "15672:15672" restart: always - # networks: - # - egov-network environment: TZ: Asia/Seoul @@ -66,12 +55,10 @@ services: ports: - "8085:9411" restart: always - # networks: - # - egov-network environment: TZ: Asia/Seoul networks: default: - external: true - name: egov-network \ No newline at end of file + external: + name: egov-network \ No newline at end of file