JunsuLime / spring-cloud-native-explorer

Spring cloud explorer
1 stars 0 forks source link

로컬환경에서 Docker 를 통해 모든 환경을 띄우자. #33

Closed JunsuLime closed 2 years ago

JunsuLime commented 2 years ago

16 에서는 rabbitmq, config-server 까지만 띄웠다.

config-server 의 설정을 소비하는 cloud-explorer 도 띄우도록 하자.

JunsuLime commented 2 years ago

컨테이너 내부에서는 외부 network 에 접속 가능한가?? docker bash 로 들어가서 확인해보자.

docker run -i -t ubuntu:14.04

docker 내부에서 ping github.com을 했을 때 transmit 은 되지만 receive 가 되지않는다. (이건 왜 그런지 모르겠지만 안되는 원인은 아니다)

===

https://docs.docker.com/compose/networking/#links docker compose 에서는 default service name 으로 network 를 연결할 수 있으며, links 를 통해 별칭을 등록할 수 있다.

JunsuLime commented 2 years ago

https://www.entrust.com/ko/blog/2019/01/removal-of-underscores-from-domain-names/ domain name 에는 underscore 가 들어갈 수 없다.

service name 이 docker domain name 을 따라가며, service name 또한 underscore 없이 설정해야한다.

JunsuLime commented 2 years ago

https://docs.docker.com/compose/networking/

docker network 내에서 접근하는 것이라면 container port 와 docker domain 으로 접근 필요

JunsuLime commented 2 years ago

client 는 시동 시 fetch 에 실패하면 config 정보가 업데이트 되지않는다.

  1. n번 이상 try 하게 할 수 있는가?
  2. 정보를 못가져올 시 동작이 실패하게 할 수 있는가?

Spring Boot 2.4 introduced a new way to import configuration data via the spring.config.import property

2.4 버전 부터는 import property 를 제공한다. (2.4 미만에서는 bootstrap 필요 / 이후는 application.~ 에서 설정 가능)