

์ด๋ถ๋ถ์ด ๊ผญ ์์ด์ผํจ


1. ํ์ผ๋ค ๋ง๋ค๊ณ ์ํฌ๋ฆฟ ๋นผ๊ณ ๋ ๋๋จธ์ง api-server ํ์ผ ๋ณต์ฌํ๊ธฐ
2. ๊น์ ๋ฐ์ ํ๋๋ง ๋ณต์ฌํ๊ณ ๋๋จธ์ง๋ ๋ค ์ง์ฐ๊ธฐ
3. ํ์ผ ์ถ๊ฐ-docker-compose.yaml (์๋ก๋ง๋ค๊ธฐ -ํ ์คํธ ๋ฌธ์)

4. Dockerfile (ํ์ฅ์ ์์. ์์ ๋๋ฌธ์! ) ํ์ผ ๋ง๋ค๊ณ ๊ฐ๊ฐ ํ์ผ์ ๋ชจ๋ ๋ณต์ฌ ๋ถ์ฌ๋ฃ๊ธฐ ํด์ ๋ฃ๊ธฐ (์๋น์ค ํ์ผ๋ ๊ฐ๊ฐ ์ด๊ธฐ, yamlํ์ผ์ ํ๋๋ง ๋ง๋ค์ด์ ๋ฐ์ ๋๋๊ฑฐ!)
5. api-server์์ ์ปค์ ์ด๊ธฐ


์ด๊ฒ ๋ ์ install ๋๋ฆ
@Dockerfile ์ฌ๊ธฐ์ ์คํ jdk 21 ์ฌ๋ฆผ ๋ฒ์ ์ด๋ฏธ์ง๋ฅผ, ๋ณผ๋ฅจ์ tmp๋ฅผ ์ฌ์ฉํด์ค.์ํธ๋ฆฌ ํฌ์ธํธ๋ gateway๋ก ํด์ ์ด ํ์ผ์ ์์ฑํด์ค


@docker-compose.yaml ์ฌ๊ธฐ์ @Dockerfile @Dockerfile @Dockerfile @Dockerfile @Dockerfile @Dockerfile ์ด๊ฒ๋ค์ ํ๋ฒ์ ์คํํ๋ ์ฝ๋๋ฅผ ์์ฑํด์ค
๋์ปค ํ์ผ ๋ชจ๋ ๋์ด๋ค ๋๊ณ ๋งํ๊ธฐ!!
ํ์์ ๋ฐ๋ผ ํฌํธ ๋ฒํธ๋ ํ๊ฒฝ ๋ณ์๋ฅผ ์์ ํ์ค ์ ์์ต๋๋ค!

์๋น์ค๋ณ ํฌํธ:
Config Server: 8888
Eureka Server: 8761
Gateway Server: 8080
Common Service: 8081
Soccer Service: 8082
User Service: 8083
** ํฌํธ ๋ฒํธ ์์ด์ผํจ
๊ฐ ํ์ผ ์์ ๋น๋๊ทธ๋๋ค ํ์ผ์ dependencies ์์๋ฅผ ์์ ํด์ฃผ๊ธฐ

์ปจํผ๊ทธ ์๋ฒ ๊ทธ๋๋ค
implementation group: 'org.springframework.cloud', name: 'spring-cloud-config-server', version: '4.1.3' implementation group: 'org.springframework.boot', name: 'spring-boot-starter-actuator', version: '3.3.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' implementation 'org.springframework.cloud:spring-cloud-config-server' implementation 'org.springframework.boot:spring-boot-starter-actuator'
์ ๋ ์นด ์๋ฒ ๊ทธ๋๋ค
implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-netflix-eureka-server', version: '4.1.3' implementation group: 'org.springframework.cloud', name: 'spring-cloud-config', version: '4.1.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
๊ฒ์ดํธ์จ์ด ๊ทธ๋๋ค // spring security implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '3.3.4' implementation group: 'org.springframework.boot', name: 'spring-boot-starter-oauth2-client', version: '3.3.4' // spring webflux //implementation group: 'org.springframework.boot', name: 'spring-boot-starter-webflux', version: '3.3.4' // spring cloud implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-gateway', version: '4.0.0' implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-circuitbreaker-reactor-resilience4j', version: '3.1.2' // JWT implementation 'io.jsonwebtoken:jjwt-api:0.12.6' runtimeOnly 'io.jsonwebtoken:jjwt-impl:0.12.6' runtimeOnly 'io.jsonwebtoken:jjwt-jackson:0.12.6' // prometheus implementation group: 'io.micrometer', name: 'micrometer-registry-prometheus', version: '1.13.4' // spring doc implementation group: 'org.springdoc', name: 'springdoc-openapi-starter-webflux-ui', version: '2.6.0' // config implementation group: 'org.springframework.cloud', name: 'spring-cloud-config', version: '4.1.3' // mongo implementation 'org.springframework.boot:spring-boot-starter-data-mongodb-reactive' // lombok compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'io.projectreactor:reactor-test' testImplementation 'org.springframework.security:spring-security-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' implementation 'org.springframework.cloud:spring-cloud-starter-config' implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
**๋ชจ๋ ์๋น์ค์ ๋์ผํ๊ฒ ๋ฃ๊ธฐ
๋ง์ดํฌ๋ก ์๋น์ค implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' annotationProcessor 'com.querydsl:querydsl-apt:5.0.0:jakarta' annotationProcessor 'jakarta.annotation:jakarta.annotation-api' annotationProcessor 'jakarta.persistence:jakarta.persistence-api' implementation 'jakarta.servlet:jakarta.servlet-api:6.0.0' // Spring Boot ์คํํฐ implementation 'org.springframework.boot:spring-boot-starter-data-jdbc' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.seleniumhq.selenium:selenium-java:4.19.1' implementation 'org.seleniumhq.selenium:selenium-chrome-driver:4.19.1' implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta' annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta" annotationProcessor "jakarta.annotation:jakarta.annotation-api" annotationProcessor "jakarta.persistence:jakarta.persistence-api" implementation 'org.jsoup:jsoup:1.15.3' implementation 'org.springframework.cloud:spring-cloud-starter-config' implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client' compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' // Spring Boot DevTools developmentOnly 'org.springframework.boot:spring-boot-devtools' runtimeOnly 'com.mysql:mysql-connector-j' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.9.3' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3' // Swagger ์ค์ ์ ์ํ Springdoc OpenAPI implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8" testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.9.3' // junit ์ต์ข ๋ฒ์ testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.3' // JUnit Jupiter API testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.3' // JUnit Jupiter Engine // selenium ๋ผ์ด๋ธ๋ฌ๋ฆฌ (๋์ ์ฌ์ดํธ) //implementation 'org.seleniumhq.selenium:selenium-java:4.1.2' implementation group: 'org.seleniumhq.selenium', name: 'selenium-java', version: '4.19.1' implementation 'org.seleniumhq.selenium:selenium-java:4.19.1' implementation 'org.seleniumhq.selenium:selenium-chrome-driver:4.19.1' implementation 'io.github.bonigarcia:webdrivermanager:5.3.0' //์์์ฆ ์ธ์ OCR์ ์ํ JSON ํ์ฑ implementation 'com.googlecode.json-simple:json-simple:1.1.1' // ํด๋ผ์ฐ๋ ์คํ ๋ฆฌ์ง ์ฌ์ฉ์ ์ํ AWS SDK S3 implementation 'com.amazonaws:aws-java-sdk-s3:1.12.300' implementation 'javax.xml.bind:jaxb-api:2.3.1' implementation 'org.json:json:20211205'
๋ฃจํธ ๋น๋ ๊ทธ๋๋ค ๋ํ๋์ testImplementation 'org.springframework.boot:spring-boot-starter-test' testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
-๋งจ ๋ฐ์ ์๋ ๋น๋ ๊ทธ๋๋ค

privateKey: | -----BEGIN OPENSSH PRIVATE KEY----- b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABFwAAAAdzc2gtcn NhAAAAAwEAAQAAAQEAnLDFrxGBk69QQ0ZWeNNnHUUxCqr6Hrkre0tjb0uspksbU+7yQhfG F0SrIdmmmQJ7r47LPBoTHWjbm+SWI0Zq/lYDQZtZIsP+w91MaDXP+1Q1mm3147m/DjEMfO srgaoaDEfJVa2byr88CoTSALLvulIRHWS1dIGMpw4fHMqBTpqq67l96b57xWtvm+7uQra6 C2ksktvxOEzJQz7vA/DLAbqYvdnHXXJ79xsFvIi4j09BPNItVjL6WVybr6MPix1Qjievb0 QXboA5MVeoPBgqQOPCxzalcI4Y73b4VoQIKgsak94h4s3w0CFlu0fPWXRA915HdWZqvfld hyqFMqw8pwAAA8iH7cM6h+3DOgAAAAdzc2gtcnNhAAABAQCcsMWvEYGTr1BDRlZ402cdRT -----END OPENSSH PRIVATE KEY-----//key:my secret ๊ตฌ์ฑ์๋ฒ์์ openssh provate key๋ฅผ ๋ฑ๋กํ๋ ค๊ณ ํด ๊ณผ์ ์ ์๋ ค์ค


ssh-keygen -t ed25519 -C "seoeunjin716@gmail.com"
cat ~/.ssh/id_ed25519.pub
2. GitHub์ ๊ณต๊ฐ ํค ๋ฑ๋ก
GitHub ๊ณ์ ์ Ed25519 ๊ณต๊ฐ ํค๋ฅผ ์ถ๊ฐํ์ฌ SSH ์ธ์ฆ์ ์ค์ ํฉ๋๋ค.
- GitHub์ ๋ก๊ทธ์ธ:
- ๋ธ๋ผ์ฐ์ ์์ GitHub์ ๋ก๊ทธ์ธํฉ๋๋ค.
- SSH ํค ์ถ๊ฐ ํ์ด์ง๋ก ์ด๋:
- ์ค๋ฅธ์ชฝ ์๋จ ํ๋กํ ์์ด์ฝ → Settings → SSH and GPG keys → New SSH key ๋๋ Add SSH key ๋ฒํผ ํด๋ฆญ.
- ๊ณต๊ฐ ํค ์ถ๊ฐ:
- Title: ํค๋ฅผ ์๋ณํ ์ด๋ฆ(์: "My Laptop Ed25519").
- Key type: "Authentication Key" ์ ํ (๊ธฐ๋ณธ๊ฐ).
- Key: ๋ก์ปฌ์์ ๋ณต์ฌํ ๊ณต๊ฐ ํค๋ฅผ ๋ถ์ฌ๋ฃ์ต๋๋ค.
- cat ~/.ssh/id_ed25519.pub์ ์ถ๋ ฅ๊ฐ์ ๋ณต์ฌํ๊ฑฐ๋, ํ์ผ ๋ด์ฉ์ ์ง์ ๋ถ์ฌ๋ฃ์ต๋๋ค.
- Add SSH key ๋ฒํผ ํด๋ฆญ.
- ์ธ์ฆ ํ์ธ:
- GitHub๊ฐ ๊ณ์ ๋น๋ฐ๋ฒํธ๋ฅผ ์์ฒญํ ์ ์์ต๋๋ค.

.shhํ์ผ์์ ํ์์(ํฐ๋ฏธ๋)์ด๊ธฐ
์๋์ ๊ฐ์ ๋ช ๋ น์ด ๋ฃ๊ธฐ
cat ~/.ssh/id_ed25519.pub

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILzeFpfbY8xdxH9Vys09wDZViQf9Dd5js5lBRVq775nG seoeunjin716@gmail.com
-์ด ๋ด์ฉ์ ๊นํ๋ธ์ ๋ฃ๊ธฐ
- SSH ํค ์ถ๊ฐ ํ์ด์ง๋ก ์ด๋:
- ์ค๋ฅธ์ชฝ ์๋จ ํ๋กํ ์์ด์ฝ → Settings → SSH and GPG keys → New SSH key ๋๋ Add SSH key ๋ฒํผ ํด๋ฆญ.

ํ์์ ์์ cat ์ฐ๊ณ ํญ ๋๋ฅด๋ฉด ์ง์ ๋์ด
cat .\id_ed25519

๋ฐ์ ์ฝ๋๋ฅผ configration ์ ์๋ yamlํ์ผ์ ๋ฃ๊ธฐ
url ์ ๊นํ๋ธ์์ ๊ฐ์ ธ์ค๊ธฐ (ssh)

๋ฐ๋์ private๋ก ์ค์ ํ๊ธฐ!!


๊ฒ์ดํธ์จ์ด ์ดํ๋ฆฌ์ผ์ด์ .yaml์ญ์
์ ๋ ์นด ์์ yaml ์ญ์
๋ชจ๋ yamlํ์ผ ์ญ์ , configration ๋นผ๊ณ !

๋์ ์ด ๋ ํ์ผ์ ๋ง๋ค์ด์ค~! (๊ณตํ์ผ)-์ด์ฌ ์ํจ๋ค๋ ๊ฐ๋

๋ค yamlํ์ผ ์ญ์ ํ๊ณ

์ํฌ๋ฆฟ์ ๋ง๋ค์ด์ค
@application.yaml ์ฌ๊ธฐ์์ @application.yaml (18-22) ์ด ๋น๋ฐํค๋ฅผ .envํ์ผ์์ ํธ์ถํ๋๋ก ํด์ค

๋ค ๋ณต๋ถํ์ง ๋ง๊ณ ์ผ๋ถ๋ถ๋ง ์ปค์ํํ ๋ฌผ์ด๋ณด๊ธฐ


๋ฃ๊ธฐ





echo "# esgseed-secret" >> README.md
git init
git add .
git commit -m "๋ณด์ ํด๋ ์์ฑ 2511 18:00"
git branch -M main
git remote add origin git@github.com:seoeunjin716/esgseed-secret.git
git push -u origin main -์ฌ๊ธฐ์ YES ๋๋ฅด๊ธฐ
์ฌ๋ฆฌ๋ ๋ฐฉ๋ฒ!! ์กฐ์ฌํ ํ์ธํ๊ธฐ


api ๊นํ๋ธ์ ์ฌ๋ ค์ง๊ณ env ํ์ผ ์๋ณด์ด๊ณ secret ํ์ผ ์๋๋ฌ์ง๋ฉด ์ฑ๊ณต!
'Project ESG+AI > [์ผ์ KPMG]ESG ๋ฐ์ดํฐ ํ์ฉ ํ์คํ ๊ฐ๋ฐ' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| 26์ผ์ฐจ. (0) | 2025.11.13 |
|---|---|
| 25์ผ์ฐจ. ์ ๋ ์นด! ๋ฅผ ํธ์ถํ์ (0) | 2025.11.12 |
| 23์ผ์ฐจ. ui์ api๋ฅผ ์ฐ๊ฒฐํด๋ณด์(ํฐ๋ฏธ๋์ ์ ๋ ฅ๊ฐ ๋จ๊ฒ) (0) | 2025.11.10 |
| 22์ผ์ฐจ. ui-server ๋ฅผ ๋ค์ ๊ตฌ์ถํ๊ธฐ (0) | 2025.11.07 |
| 21์ผ์ฐจ. ์ฐ๋ฆฌ ํ์ ERD๋ฅผ ์์ฑํ์ (0) | 2025.11.07 |