본문 바로가기

MSA

Github 레포지토리 config 서버 연동

원격 레포에 올린 파일을 이용한 처리 방법 

 

1. 원격 레포지토리를 하나 만듭니다.

2. 사용할 yml파일들을 그곳에 올려줍니다.

 

 

3. Config- server 프로그램 내 application.yml파일을 작성

spring:
  cloud:
    config:
      server:
        git:
          uri: 레포지토리 주소
            username: 깃허브 계정명 # 퍼블릭에서는 불필요
            password: 깃허브 패스워드 # 퍼블릭에서는 불필요
          

 

 

이때, 깃허브 계정명과 깃허브 패스워드는 보안 설정을 위해서 암호화를 진행합니다.

  https://www.devglan.com/online-tools/jasypt-online-encryption-decryption

 

Programming Blog Article Feeds as per your Interest | DevGlan

Best programming article feeds as per your Interest on different technologies. Subscribe to any technology and explore the best articles from around the web.

www.devglan.com

 

 

4. config-client bootsteap.yml 설정

spring:
  cloud:
    config:
      uri: http://127.0.0.1:8888 #8888은 서버 config 포트번호입니다
      name: githubtest