Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌏 Deploy : prod/dev 용 μ  ν‚¨μŠ€νŒŒμΌ #106

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
55a3017
fix:backcicd.yaml 도컀 μ»¨ν…Œμ΄λ„ˆλ₯Ό 내리고 λ‹€μ‹œ μ˜¬λ¦¬λ„λ‘ 변경함
yoonseopkim Nov 13, 2024
35c71cc
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Nov 13, 2024
2938a9e
fix:backcicd.yaml 도컀 컴포즈 yml μ—μ„œ yaml μˆ˜μ •
yoonseopkim Nov 13, 2024
204039e
fix:backcicd.yaml 도컀 컴포즈 yml μ—μ„œ yaml μˆ˜μ •
yoonseopkim Nov 14, 2024
5c5c588
fix:backcicd.yaml μ£Όμ„μ˜€λ₯˜ μˆ˜μ •
yoonseopkim Nov 14, 2024
be41d46
fix:backcicd.yaml μ£Όμ„μ˜€λ₯˜ μˆ˜μ •2
yoonseopkim Nov 14, 2024
b9f02b5
fix:backcicd.yaml dev1 νƒœκ·Έμ—μ„œ test 둜 λ³€κ²½
yoonseopkim Nov 14, 2024
ec56dd6
fix:backcicd.yaml μ½”λ“œ λ¦¬νŒ©ν† λ§
yoonseopkim Nov 15, 2024
e6b92f8
fix:backcicd.yaml μ•„ν‚€ν…μ²˜ ꡬ쑰에 맞게 ν• λ‹Ή μΈμŠ€ν„΄μŠ€ λ³€κ²½
yoonseopkim Nov 15, 2024
54bbc19
fix:backcicd.yaml 적용 브랜치 λ³€κ²½
yoonseopkim Nov 15, 2024
8252402
fix:backcicd.yaml ν™˜κ²½λ³€μˆ˜ μˆ˜μ •
yoonseopkim Nov 15, 2024
b1f7032
fix:backcicd.yaml ν™˜κ²½λ³€μˆ˜ μˆ˜μ •2
yoonseopkim Nov 15, 2024
78d5e3d
fix:backcicd.yaml ν™˜κ²½λ³€μˆ˜ μˆ˜μ •3
yoonseopkim Nov 15, 2024
fdc810c
fix:backcicd.yaml 각 λͺ¨λ“ˆλ³„ jobs 둜 뢄리
yoonseopkim Nov 15, 2024
0f0d496
fix:backcicd.yaml 멀버λͺ¨λ“ˆ ν…ŒμŠ€νŠΈ
yoonseopkim Nov 15, 2024
6878ce7
fix:backcicd.yaml 및 각 λ„μ»€νŒŒμΌμ— ν™˜κ²½λ³€μˆ˜ λ„£μ–΄μ„œ μ‹€ν–‰ ν…ŒμŠ€νŠΈ
yoonseopkim Nov 15, 2024
7e19ca9
fix:backcicd.yaml 전체λͺ¨λ“ˆ μ‹€ν–‰ ν…ŒμŠ€νŠΈ
yoonseopkim Nov 15, 2024
ce5bf27
fix:backcicd.yaml 전체λͺ¨λ“ˆ μ‹€ν–‰ ν…ŒμŠ€νŠΈ λ„μ»€νŒŒμΌ λŒ€λ¬Έμžλ‘œ λ³€κ²½
yoonseopkim Nov 15, 2024
a20343e
fix:backcicd.yaml json νŒŒμ‹±μœΌλ‘œ λ³€κ²½
yoonseopkim Nov 15, 2024
ffc1b80
fix:backcicd.yaml json νŒŒμ‹±μœΌλ‘œ λ³€κ²½2
yoonseopkim Nov 15, 2024
d6f94a1
fix:backcicd.yaml json νŒŒμ‹±μœΌλ‘œ λ³€κ²½3
yoonseopkim Nov 15, 2024
8ff49ea
fix:backcicd.yaml json νŒŒμ‹±μœΌλ‘œ λ³€κ²½4
yoonseopkim Nov 15, 2024
901f9bf
fix:backcicd.yaml json νŒŒμ‹±μœΌλ‘œ λ³€κ²½5
yoonseopkim Nov 15, 2024
d37623e
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Nov 15, 2024
5e85129
fix:backcicd.yaml 파일λͺ… μˆ˜μ •
yoonseopkim Nov 15, 2024
139f677
fix:backcicd.yaml λ„μ»€νŒŒμΌ 경둜 μˆ˜μ •
yoonseopkim Nov 15, 2024
78743e2
fix:backcicd.yaml λ„μ»€νŒŒμΌ 경둜 μˆ˜μ •2
yoonseopkim Nov 15, 2024
e5ce350
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Nov 17, 2024
d81a074
fix:backcicd.yaml ec2에 .env μ£Όμž…
yoonseopkim Nov 18, 2024
45d6b63
fix:backcicd.yaml ν™˜κ²½λ³€μˆ˜ μˆ˜μ •, 앱단 ν™˜κ²½λ³€μˆ˜ 였λ₯˜ μˆ˜μ •
yoonseopkim Nov 18, 2024
6d36643
fix:λ„μ»€νŒŒμΌ ν™˜κ²½λ³€μˆ˜ κ΄€λ ¨ μ„€μ •
yoonseopkim Nov 18, 2024
db2dda5
fix: member 도 env μ•ˆλ³΅μ‚¬ν•˜κ²Œ λ°”κΏˆ
yoonseopkim Nov 18, 2024
74854ca
fix: λ„μ»€νŒŒμΌ 볡ꡬ
yoonseopkim Nov 18, 2024
73421c9
fix: λ„μ»€νŒŒμΌ λ³€ν™˜κ²½λ³€μˆ˜ κ²½
yoonseopkim Nov 18, 2024
7f4702c
fix: λ„μ»€νŒŒμΌ λ³€ν™˜κ²½λ³€μˆ˜ κ²½2
yoonseopkim Nov 18, 2024
1c6ea1a
fix: λΉŒλ“œνƒ€μž„-> λŸ°νƒ€μž„ ν™˜κ²½λ³€μˆ˜ μ£Όμž… λ°©μ‹μœΌλ‘œ λ³€κ²½
yoonseopkim Nov 18, 2024
6867920
fix: λ„μ»€μ»΄ν¬μ¦ˆ μˆ˜μ •
yoonseopkim Nov 19, 2024
228b285
fix: λ„μ»€μ»΄ν¬μ¦ˆ μˆ˜μ •2
yoonseopkim Nov 19, 2024
47e7b8a
fix: λ„μ»€μ»΄ν¬μ¦ˆ μˆ˜μ •3
yoonseopkim Nov 19, 2024
1f46f5e
fix: λ„μ»€μ»΄ν¬μ¦ˆ μˆ˜μ •4
yoonseopkim Nov 19, 2024
af12fd7
fix: λ„μ»€μ»΄ν¬μ¦ˆ μˆ˜μ •5
yoonseopkim Nov 19, 2024
458108e
fix: λ„μ»€μ»΄ν¬μ¦ˆ μˆ˜μ •6
yoonseopkim Nov 21, 2024
9f7ab38
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Nov 21, 2024
084d542
fix: 적용브랜치 μˆ˜μ •
yoonseopkim Nov 21, 2024
d5df2d4
fix: 적용브랜치 μˆ˜μ •2
yoonseopkim Nov 21, 2024
308fdb6
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Nov 21, 2024
e127fc0
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Nov 29, 2024
9c849c2
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 2, 2024
a018d68
feat: μ•Œλ¦Ό,μ±„νŒ… λͺ¨λ“ˆ μΆ”κ°€
yoonseopkim Dec 2, 2024
fe1bddf
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 2, 2024
c1ef1f3
fix: λΉŒλ” λ„μ»€νŒŒμΌ λ³€κ²½
yoonseopkim Dec 2, 2024
3d43c46
fix: λΉŒλ” λ„μ»€νŒŒμΌ μ‹€ν–‰ μˆœμ„œ λ³€κ²½
yoonseopkim Dec 2, 2024
e3079dd
fix: ν…ŒμŠ€νŠΈμš© 컀밋
yoonseopkim Dec 2, 2024
2cc3be5
fix: cicd ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€
yoonseopkim Dec 2, 2024
a337729
fix: cicd ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€ 2
yoonseopkim Dec 2, 2024
12ce529
fix: cicd ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€ 3
yoonseopkim Dec 2, 2024
0c1b521
fix: cicd ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€ 4
yoonseopkim Dec 2, 2024
19de1d6
fix: cicd ν…ŒμŠ€νŠΈ μ½”λ“œ μΆ”κ°€ 5
yoonseopkim Dec 2, 2024
67bb45b
fix: μΉ΄ν”„μΉ΄ νŒŒμ‹± μˆ˜μ •
yoonseopkim Dec 2, 2024
bfdb2f2
fix: μΉ΄ν”„μΉ΄ νŒŒμ‹± μˆ˜μ • 2
yoonseopkim Dec 2, 2024
08c5ea9
fix: μΉ΄ν”„μΉ΄ νŒŒμ‹± μˆ˜μ • 3
yoonseopkim Dec 2, 2024
f6591d7
fix: μ΅œμ‹ μ»€λ°‹ λ‘€λ°±
yoonseopkim Dec 2, 2024
a419958
fix: λ„μ»€μ»΄ν¬μ¦ˆ μ„œλΉ„μŠ€ μΆ”κ°€
yoonseopkim Dec 2, 2024
bcb0795
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 3, 2024
e75ac4a
fix: 적용 브랜치 λ³€κ²½
yoonseopkim Dec 3, 2024
e83a670
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 3, 2024
ac11f7d
fix: 루트 λ„μ»€νŒŒμΌ μˆ˜μ •
yoonseopkim Dec 4, 2024
800251c
fix: 루트 λ„μ»€νŒŒμΌ μˆ˜μ •2
yoonseopkim Dec 4, 2024
0d8d696
fix: 루트 λ„μ»€νŒŒμΌ μˆ˜μ • 3
yoonseopkim Dec 5, 2024
1a3ed09
fix: 루트 λ„μ»€νŒŒμΌ μˆ˜μ • 4
yoonseopkim Dec 5, 2024
fefbf9b
fix: 루트 λ„μ»€νŒŒμΌ μˆ˜μ • 5
yoonseopkim Dec 5, 2024
e00b99f
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 5, 2024
9cc6946
fix: cicd νŒŒμ΄ν”„λΌμΈ κ°œμ„ (λΉŒλ“œ 방식)
yoonseopkim Dec 5, 2024
9c546bf
fix: λ³€κ²½λœ λ‘œλ“œλ°ΈλŸ°μ„œ 반영 ν…ŒμŠ€νŠΈ
yoonseopkim Dec 5, 2024
f46d7a2
fix: λ³€κ²½λœ λ‘œλ“œλ°ΈλŸ°μ„œ 반영 ν…ŒμŠ€νŠΈ 2
yoonseopkim Dec 5, 2024
a450ed7
fix: λ³€κ²½λœ λ‘œλ“œλ°ΈλŸ°μ„œ 반영 ν…ŒμŠ€νŠΈ 3
yoonseopkim Dec 5, 2024
88a3201
fix: λ³€κ²½λœ λ‘œλ“œλ°ΈλŸ°μ„œ 반영 ν…ŒμŠ€νŠΈ 4
yoonseopkim Dec 8, 2024
30479a5
fix: λ³€κ²½λœ λ‘œλ“œλ°ΈλŸ°μ„œ 반영 ν…ŒμŠ€νŠΈ 4
yoonseopkim Dec 9, 2024
9578657
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 9, 2024
c2ef49a
feat : prod/dev 용 μ  ν‚¨μŠ€νŒŒμΌ
yoonseopkim Dec 16, 2024
37e9cf5
Merge remote-tracking branch 'origin/develop' into 48-Develop브랜치-ν‘Έμ‹œμ‹œ-…
yoonseopkim Dec 16, 2024
276ca46
feat : prod/dev 용 μ  ν‚¨μŠ€νŒŒμΌ
yoonseopkim Dec 17, 2024
920056e
feat : prod/dev 용 μ  ν‚¨μŠ€νŒŒμΌ
yoonseopkim Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
297 changes: 0 additions & 297 deletions .github/workflows/backcicd.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ out/
gradlew.*
### envs ###
.env
.env*

### Java ###
# Compiled class file
Expand Down
156 changes: 156 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
// pipeline {
// agent any
//
// environment {
// AWS_REGION = 'ap-northeast-2'
// DOCKER_TAG = 'test'
// }
//
// stages {
// stage('μ†ŒμŠ€μ½”λ“œ 체크아웃') {
// steps {
// script {
// deleteDir()
// git branch: 'develop',
// url: 'https://github.com/KTB-Sixmen/gitfolio_back_spring.git'
// }
// }
// }
//
// stage('ν™˜κ²½ μ„€μ •') {
// steps {
// script {
// def envFile = '/var/lib/jenkins/environments/.env.back.dev'
//
// if (fileExists(envFile)) {
// sh """
// cp ${envFile} .env
// echo 'ν™˜κ²½ 파일 볡사 μ™„λ£Œ: ${envFile}'
// """
// } else {
// error "ν™˜κ²½ νŒŒμΌμ„ 찾을 수 μ—†μŠ΅λ‹ˆλ‹€: ${envFile}"
// }
//
// // Docker Hub 둜그인 - AI νŒŒμ΄ν”„λΌμΈ λ°©μ‹μœΌλ‘œ λ³€κ²½
// withCredentials([usernamePassword(credentialsId: 'docker-credentials',
// usernameVariable: 'DOCKER_USER',
// passwordVariable: 'DOCKER_PASS')]) {
// sh """
// echo ${DOCKER_PASS} | docker login -u ${DOCKER_USER} --password-stdin
// """
// }
// }
// }
// }
//
// stage('Builder 이미지 λΉŒλ“œ') {
// steps {
// script {
// sh """
// docker build \
// -f dockerfile \
// -t aida0/gitfolio_builder:${DOCKER_TAG} \
// --platform linux/amd64 \
// .
//
// docker push aida0/gitfolio_builder:${DOCKER_TAG}
// """
// }
// }
// }
//
// stage('λͺ¨λ“ˆ λΉŒλ“œ 및 배포') {
// matrix {
// axes {
// axis {
// name 'MODULE'
// values 'auth', 'member', 'payment', 'resume', 'notification', 'chat'
// }
// }
// stages {
// stage('λͺ¨λ“ˆ λΉŒλ“œ') {
// steps {
// script {
// def moduleConfig = [
// auth: [path: './gitfolio-auth', image: 'aida0/gitfolio_auth', index: '1'],
// member: [path: './gitfolio-member', image: 'aida0/gitfolio_member', index: '1'],
// payment: [path: './gitfolio-payment', image: 'aida0/gitfolio_payment', index: '2'],
// resume: [path: './gitfolio-resume', image: 'aida0/gitfolio_resume', index: '2'],
// notification: [path: './gitfolio-notification', image: 'aida0/gitfolio_notification', index: '3'],
// chat: [path: './gitfolio-chat', image: 'aida0/gitfolio_chat', index: '4']
// ]
//
// def config = moduleConfig[MODULE]
//
// sh """
// docker build \
// -f ${config.path}/dockerfile \
// -t ${config.image}:${DOCKER_TAG} \
// ${config.path}
//
// docker push ${config.image}:${DOCKER_TAG}
// """
//
// // AWS 자격증λͺ… 처리λ₯Ό AI νŒŒμ΄ν”„λΌμΈ λ°©μ‹μœΌλ‘œ λ³€κ²½
// withCredentials([[$class: 'AmazonWebServicesCredentialsBinding',
// credentialsId: 'aws-credentials',
// accessKeyVariable: 'AWS_ACCESS_KEY_ID',
// secretKeyVariable: 'AWS_SECRET_ACCESS_KEY']]) {
//
// def instanceIds = sh(
// script: """
// aws ec2 describe-instances \
// --region ${AWS_REGION} \
// --filters 'Name=tag:Service,Values=back' \
// 'Name=tag:Index,Values=${config.index}' \
// 'Name=tag:Environment,Values=dev' \
// 'Name=tag:Type,Values=ec2' \
// 'Name=instance-state-name,Values=running' \
// --query 'Reservations[].Instances[].InstanceId' \
// --output text
// """,
// returnStdout: true
// ).trim()
//
// if (instanceIds) {
// sh """
// aws ssm send-command \
// --instance-ids "${instanceIds}" \
// --document-name "AWS-RunShellScript" \
// --comment "Deploying ${MODULE} module" \
// --parameters commands='
// cd /home/ec2-user
// docker-compose down -v --rmi all
// docker-compose pull
// docker-compose up -d
// ' \
// --timeout-seconds 600 \
// --region ${AWS_REGION}
// """
// } else {
// error "${MODULE} λͺ¨λ“ˆμ„ μœ„ν•œ EC2 μΈμŠ€ν„΄μŠ€λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€."
// }
// }
// }
// }
// }
// }
// }
// }
// }
//
// post {
// always {
// script {
// sh 'docker logout'
// sh 'rm -f .env'
// }
// }
// success {
// echo "νŒŒμ΄ν”„λΌμΈμ΄ μ„±κ³΅μ μœΌλ‘œ μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€."
// }
// failure {
// echo "νŒŒμ΄ν”„λΌμΈμ΄ μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€. 둜그λ₯Ό ν™•μΈν•΄μ£Όμ„Έμš”."
// }
// }
// }
200 changes: 11 additions & 189 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -1,200 +1,22 @@
# λΉŒλ“œ μŠ€ν…Œμ΄μ§€
FROM gradle:7-jdk17 AS builder

# URL κ΄€λ ¨ ARG
ARG REDIRECT_ONBOARDING_URL
ARG REDIRECT_MAIN_URL
ARG MEMBER_SERVER_URL
ARG PAYMENT_SERVER_URL
ARG NOTIFICATION_SERVER_URL
ARG AI_SERVER_URL
ARG PAYMENT_SUCCESS_REDIRECT_URL

# gRPC와 Server Port ARG
ARG MEMBER_GRPC_PORT
ARG AUTH_SERVER_PORT
ARG MEMBER_SERVER_PORT
ARG RESUME_SERVER_PORT
ARG PAYMENT_SERVER_PORT
ARG NOTIFICATION_SERVER_PORT
ARG CHAT_SERVER_PORT

# GitHub OAuth κ΄€λ ¨ ARG
ARG GH_CLIENT_ID
ARG GH_CLIENT_SECRET
ARG GH_REDIRECT_URI
ARG GH_API_TOKEN

# JWT κ΄€λ ¨ ARG
ARG JWT_SECRET_KEY
ARG ACCESS_TOKEN_EXPIRY
ARG REFRESH_TOKEN_EXPIRY

# Redis κ΄€λ ¨ ARG
ARG AUTH_REDIS_HOST
ARG AUTH_REDIS_PORT
ARG RESUME_REDIS_HOST
ARG RESUME_REDIS_PORT

# MySQL κ΄€λ ¨ ARG
ARG MEMBER_MYSQL_DB_HOST
ARG MEMBER_MYSQL_DB_PORT
ARG MEMBER_MYSQL_DB_NAME
ARG MEMBER_MYSQL_DB_PASSWORD
ARG MEMBER_MYSQL_DB_USERNAME
ARG LIKE_MYSQL_DB_HOST
ARG LIKE_MYSQL_DB_PORT
ARG LIKE_MYSQL_DB_NAME
ARG LIKE_MYSQL_DB_PASSWORD
ARG LIKE_MYSQL_DB_USERNAME
ARG PAYMENT_MYSQL_DB_HOST
ARG PAYMENT_MYSQL_DB_PORT
ARG PAYMENT_MYSQL_DB_NAME
ARG PAYMENT_MYSQL_DB_PASSWORD
ARG PAYMENT_MYSQL_DB_USERNAME
ARG NOTIFICATION_MYSQL_DB_HOST
ARG NOTIFICATION_MYSQL_DB_PORT
ARG NOTIFICATION_MYSQL_DB_NAME
ARG NOTIFICATION_MYSQL_DB_PASSWORD
ARG NOTIFICATION_MYSQL_DB_USERNAME

# MongoDB κ΄€λ ¨ ARG
ARG MEMBER_MONGO_DB_USERNAME
ARG MEMBER_MONGO_DB_PORT
ARG MEMBER_MONGO_DB_DATABASE
ARG RESUME_MONGO_DB_USERNAME
ARG RESUME_MONGO_DB_PORT
ARG RESUME_MONGO_DB_DATABASE
ARG CHAT_MONGO_DB_USERNAME
ARG CHAT_MONGO_DB_PORT
ARG CHAT_MONGO_DB_DATABASE

# S3 κ΄€λ ¨ ARG
ARG S3_ACCESS_KEY
ARG S3_SECRET_KEY
ARG S3_URL_PREFIX

# Kakao Pay κ΄€λ ¨ ARG
ARG KAKAO_API_URL
ARG KAKAOPAY_SECRET_KEY

# Kafka κ΄€λ ¨ ARG
ARG KAFKA_HOST1
ARG KAFKA_PORT1
ARG KAFKA_BROKER_ID
ARG KAFKA_ZOOKEEPER_CONNECT
ARG KAFKA_LISTENER_DOCKER
ARG KAFKA_LISTENER_EXTERNAL
ARG KAFKA_ADVERTISED_LISTENER_DOCKER
ARG KAFKA_ADVERTISED_LISTENER_EXTERNAL
ARG KAFKA_INTER_BROKER_LISTENER_NAME
ARG KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR

# ARGλ₯Ό ENV둜 λ³€ν™˜
ENV REDIRECT_ONBOARDING_URL=${REDIRECT_ONBOARDING_URL}
ENV REDIRECT_MAIN_URL=${REDIRECT_MAIN_URL}
ENV MEMBER_SERVER_URL=${MEMBER_SERVER_URL}
ENV PAYMENT_SERVER_URL=${PAYMENT_SERVER_URL}
ENV NOTIFICATION_SERVER_URL=${NOTIFICATION_SERVER_URL}
ENV AI_SERVER_URL=${AI_SERVER_URL}
ENV PAYMENT_SUCCESS_REDIRECT_URL=${PAYMENT_SUCCESS_REDIRECT_URL}

ENV MEMBER_GRPC_PORT=${MEMBER_GRPC_PORT}
ENV AUTH_SERVER_PORT=${AUTH_SERVER_PORT}
ENV MEMBER_SERVER_PORT=${MEMBER_SERVER_PORT}
ENV RESUME_SERVER_PORT=${RESUME_SERVER_PORT}
ENV PAYMENT_SERVER_PORT=${PAYMENT_SERVER_PORT}
ENV NOTIFICATION_SERVER_PORT=${NOTIFICATION_SERVER_PORT}
ENV CHAT_SERVER_PORT=${CHAT_SERVER_PORT}

ENV GH_CLIENT_ID=${GH_CLIENT_ID}
ENV GH_CLIENT_SECRET=${GH_CLIENT_SECRET}
ENV GH_REDIRECT_URI=${GH_REDIRECT_URI}
ENV GH_API_TOKEN=${GH_API_TOKEN}

ENV JWT_SECRET_KEY=${JWT_SECRET_KEY}
ENV ACCESS_TOKEN_EXPIRY=${ACCESS_TOKEN_EXPIRY}
ENV REFRESH_TOKEN_EXPIRY=${REFRESH_TOKEN_EXPIRY}

ENV AUTH_REDIS_HOST=${AUTH_REDIS_HOST}
ENV AUTH_REDIS_PORT=${AUTH_REDIS_PORT}
ENV RESUME_REDIS_HOST=${RESUME_REDIS_HOST}
ENV RESUME_REDIS_PORT=${RESUME_REDIS_PORT}

ENV MEMBER_MYSQL_DB_HOST=${MEMBER_MYSQL_DB_HOST}
ENV MEMBER_MYSQL_DB_PORT=${MEMBER_MYSQL_DB_PORT}
ENV MEMBER_MYSQL_DB_NAME=${MEMBER_MYSQL_DB_NAME}
ENV MEMBER_MYSQL_DB_PASSWORD=${MEMBER_MYSQL_DB_PASSWORD}
ENV MEMBER_MYSQL_DB_USERNAME=${MEMBER_MYSQL_DB_USERNAME}
ENV LIKE_MYSQL_DB_HOST=${LIKE_MYSQL_DB_HOST}
ENV LIKE_MYSQL_DB_PORT=${LIKE_MYSQL_DB_PORT}
ENV LIKE_MYSQL_DB_NAME=${LIKE_MYSQL_DB_NAME}
ENV LIKE_MYSQL_DB_PASSWORD=${LIKE_MYSQL_DB_PASSWORD}
ENV LIKE_MYSQL_DB_USERNAME=${LIKE_MYSQL_DB_USERNAME}
ENV PAYMENT_MYSQL_DB_HOST=${PAYMENT_MYSQL_DB_HOST}
ENV PAYMENT_MYSQL_DB_PORT=${PAYMENT_MYSQL_DB_PORT}
ENV PAYMENT_MYSQL_DB_NAME=${PAYMENT_MYSQL_DB_NAME}
ENV PAYMENT_MYSQL_DB_PASSWORD=${PAYMENT_MYSQL_DB_PASSWORD}
ENV PAYMENT_MYSQL_DB_USERNAME=${PAYMENT_MYSQL_DB_USERNAME}
ENV NOTIFICATION_MYSQL_DB_HOST=${NOTIFICATION_MYSQL_DB_HOST}
ENV NOTIFICATION_MYSQL_DB_PORT=${NOTIFICATION_MYSQL_DB_PORT}
ENV NOTIFICATION_MYSQL_DB_NAME=${NOTIFICATION_MYSQL_DB_NAME}
ENV NOTIFICATION_MYSQL_DB_PASSWORD=${NOTIFICATION_MYSQL_DB_PASSWORD}
ENV NOTIFICATION_MYSQL_DB_USERNAME=${NOTIFICATION_MYSQL_DB_USERNAME}

ENV MEMBER_MONGO_DB_USERNAME=${MEMBER_MONGO_DB_USERNAME}
ENV MEMBER_MONGO_DB_PORT=${MEMBER_MONGO_DB_PORT}
ENV MEMBER_MONGO_DB_DATABASE=${MEMBER_MONGO_DB_DATABASE}
ENV RESUME_MONGO_DB_USERNAME=${RESUME_MONGO_DB_USERNAME}
ENV RESUME_MONGO_DB_PORT=${RESUME_MONGO_DB_PORT}
ENV RESUME_MONGO_DB_DATABASE=${RESUME_MONGO_DB_DATABASE}
ENV CHAT_MONGO_DB_USERNAME=${CHAT_MONGO_DB_USERNAME}
ENV CHAT_MONGO_DB_PORT=${CHAT_MONGO_DB_PORT}
ENV CHAT_MONGO_DB_DATABASE=${CHAT_MONGO_DB_DATABASE}

ENV S3_ACCESS_KEY=${S3_ACCESS_KEY}
ENV S3_SECRET_KEY=${S3_SECRET_KEY}
ENV S3_URL_PREFIX=${S3_URL_PREFIX}

ENV KAKAO_API_URL=${KAKAO_API_URL}
ENV KAKAOPAY_SECRET_KEY=${KAKAOPAY_SECRET_KEY}

ENV KAFKA_HOST1=${KAFKA_HOST1}
ENV KAFKA_PORT1=${KAFKA_PORT1}
ENV KAFKA_BROKER_ID=${KAFKA_BROKER_ID}
ENV KAFKA_ZOOKEEPER_CONNECT=${KAFKA_ZOOKEEPER_CONNECT}
ENV KAFKA_LISTENER_DOCKER=${KAFKA_LISTENER_DOCKER}
ENV KAFKA_LISTENER_EXTERNAL=${KAFKA_LISTENER_EXTERNAL}
ENV KAFKA_ADVERTISED_LISTENER_DOCKER=${KAFKA_ADVERTISED_LISTENER_DOCKER}
ENV KAFKA_ADVERTISED_LISTENER_EXTERNAL=${KAFKA_ADVERTISED_LISTENER_EXTERNAL}
ENV KAFKA_INTER_BROKER_LISTENER_NAME=${KAFKA_INTER_BROKER_LISTENER_NAME}
ENV KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=${KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR}

WORKDIR /gitfolio_back
# 이제 λ‚˜λ¨Έμ§€ λΉŒλ“œ μ„€μ • νŒŒμΌλ“€μ„ λ³΅μ‚¬ν•©λ‹ˆλ‹€
COPY settings.gradle build.gradle ./
# Gradle Wrapper νŒŒμΌλ“€μ„ λ¨Όμ € λ³΅μ‚¬ν•©λ‹ˆλ‹€
COPY gradle gradle
COPY gradlew .
COPY gradlew.bat .
# COPY gradle-wrapper.properties gradle/wrapper/gradle-wrapper.properties

# gradle wrapper jar 파일이 μ—†λ‹€λ©΄ gradle wrapperλ₯Ό μƒˆλ‘œ μƒμ„±ν•©λ‹ˆλ‹€
RUN if [ ! -f gradle/wrapper/gradle-wrapper.jar ]; then \
gradle wrapper; \
fi


# κ·Έλž˜λ“€ μ„€μ • 파일 볡사
COPY settings.gradle build.gradle ./
COPY gradle ./gradle
COPY gradlew ./

# COPY settings.gradle build.gradle ./
# COPY gradle ./gradle
# COPY gradlew ./

# μ˜μ‘΄μ„± λ‹€μš΄λ‘œλ“œ
RUN chmod +x gradlew && \
./gradlew dependencies

# μ†ŒμŠ€ μ½”λ“œμ™€ ν™˜κ²½ 파일 볡사
COPY . .
# 이 μ‹œμ μ—μ„œ Jenkinsκ°€ λ³΅μ‚¬ν•œ .env 파일이 μ‚¬μš©λ¨

# λΉŒλ“œ μ‹€ν–‰ 및 ν™˜κ²½ 파일 볡사
RUN ./gradlew clean build -x test && \
# cp .env build && \
cp */build/libs/*-SNAPSHOT.jar build

cp .env build/ && \
cp */build/libs/*-SNAPSHOT.jar build/
Loading
Loading