Skip to content

Commit 470f0ba

Browse files
committed
infra: OCI DB 연결 정보 추가
1 parent 6aac280 commit 470f0ba

File tree

7 files changed

+139
-10
lines changed

7 files changed

+139
-10
lines changed

.github/workflows/yappu-oci-dev-cd.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ jobs:
2828
uses: microsoft/variable-substitution@v1
2929
with:
3030
files:
31-
./src/main/resources/application-dev.yaml
31+
./src/main/resources/application-dev-oci.yaml
3232
env:
3333
server.port: ${{ secrets.DEV_SERVER_PORT }}
34-
spring.datasource.url: ${{ secrets.DEV_DB_URL }}
35-
spring.datasource.username: ${{ secrets.DEV_DB_USERNAME }}
36-
spring.datasource.password: ${{ secrets.DEV_DB_PASSWORD }}
34+
spring.datasource.url: ${{ secrets.DEV_OCI_DB_URL }}
35+
spring.datasource.username: ${{ secrets.DEV_OCI_DB_USERNAME }}
36+
spring.datasource.password: ${{ secrets.DEV_OCI_DB_PASSWORD }}
3737
jwt.secret_key: ${{ secrets.DEV_JWT_SECRET_KEY }}
3838
jwt.access_token_expiration_times: ${{ secrets.DEV_ACCESS_TOKEN_EXPIRATION_TIMES }}
3939
jwt.refresh_token_expiration_times: ${{ secrets.DEV_REFRESH_TOKEN_EXPIRATION_TIMES }}
@@ -48,7 +48,7 @@ jobs:
4848
kakao.rest_api_key: ${{ secrets.KAKAO_REST_API_KEY }}
4949

5050
- name: Build with Gradle Wrapper
51-
run: ./gradlew clean build -x test -Dspring.profiles.active=dev
51+
run: ./gradlew clean build -x test -Dspring.profiles.active=dev-oci
5252

5353
- name: Prepare File for Deployment
5454
run: |

.github/workflows/yappu-oci-prod-cd.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ jobs:
2727
uses: microsoft/variable-substitution@v1
2828
with:
2929
files:
30-
./src/main/resources/application-prod.yaml
30+
./src/main/resources/application-prod-oci.yaml
3131
env:
32-
spring.datasource.url: ${{ secrets.PROD_DB_URL }}
33-
spring.datasource.username: ${{ secrets.PROD_DB_USERNAME }}
34-
spring.datasource.password: ${{ secrets.PROD_DB_PASSWORD }}
32+
spring.datasource.url: ${{ secrets.PROD_OCI_DB_URL }}
33+
spring.datasource.username: ${{ secrets.PROD_OCI_DB_USERNAME }}
34+
spring.datasource.password: ${{ secrets.PROD_OCI_DB_PASSWORD }}
3535
jwt.secret_key: ${{ secrets.PROD_JWT_SECRET_KEY }}
3636
jwt.access_token_expiration_times: ${{ secrets.PROD_ACCESS_TOKEN_EXPIRATION_TIMES }}
3737
jwt.refresh_token_expiration_times: ${{ secrets.PROD_REFRESH_TOKEN_EXPIRATION_TIMES }}
@@ -46,7 +46,7 @@ jobs:
4646
kakao.rest_api_key: ${{ secrets.KAKAO_REST_API_KEY }}
4747

4848
- name: Build with Gradle Wrapper
49-
run: ./gradlew clean build -x test -Dspring.profiles.active=prod
49+
run: ./gradlew clean build -x test -Dspring.profiles.active=prod-oci
5050

5151
- name: Prepare File for Deployment
5252
run: |

build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ dependencies {
3131
runtimeOnly("org.springframework.boot:spring-boot-docker-compose")
3232

3333
runtimeOnly("com.mysql:mysql-connector-j")
34+
runtimeOnly("com.oracle.database.jdbc:ojdbc11")
3435
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
3536
implementation("com.linecorp.kotlin-jdsl:jpql-dsl:3.5.5")
3637
implementation("com.linecorp.kotlin-jdsl:jpql-render:3.5.5")

docker/docker-compose-dev.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ services:
77
dockerfile: dockerfile-dev
88
ports:
99
- '8080:8080'
10+
volumes:
11+
- /opt/oracle/wallet:/wallet:ro

docker/docker-compose-prod.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ services:
77
dockerfile: dockerfile-prod
88
ports:
99
- '8080:8080'
10+
volumes:
11+
- /opt/oracle/wallet:/wallet:ro
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
server:
2+
forward-headers-strategy: framework
3+
4+
spring:
5+
mvc:
6+
hidden-method:
7+
filter:
8+
enabled: true
9+
docker:
10+
compose:
11+
enabled: false
12+
datasource:
13+
driver-class-name: oracle.jdbc.OracleDriver
14+
url: ${DEV_OCI_DB_URL}?TNS_ADMIN=/wallet
15+
username: ${DEV_OCI_DB_USERNAME}
16+
password: ${DEV_OCI_DB_PASSWORD}
17+
18+
jwt:
19+
secret_key: ${DEV_JWT_SECRET_KEY}
20+
access_token_expiration_times: ${DEV_ACCESS_TOKEN_EXPIRATION_TIMES}
21+
refresh_token_expiration_times: ${DEV_REFRESH_TOKEN_EXPIRATION_TIMES}
22+
23+
fcm:
24+
type: service_account
25+
project_id: yappu-world
26+
private_key_id: ${FCM_PRIVATE_KEY_ID}
27+
private_key: ${FCM_PRIVATE_KEY}
28+
client_email: ${FCM_CLIENT_EMAIL}
29+
client_id: ${FCM_CLIENT_ID}
30+
auth_uri: https://accounts.google.com/o/oauth2/auth
31+
token_uri: https://oauth2.googleapis.com/token
32+
auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
33+
client_x509_cert_url: ${FCM_X509_CERT_URL}
34+
universe_domain: googleapis.com
35+
36+
discord:
37+
webhook: ${DISCORD_WEBHOOK_URL_IN_DEV}
38+
39+
sentry:
40+
dsn: ${SENTRY_DSN}
41+
environment: dev
42+
traces-sample-rate: 1.0
43+
logging:
44+
minimum-event-level: warn
45+
minimum-breadcrumb-level: info
46+
47+
management:
48+
endpoints:
49+
web:
50+
exposure:
51+
include: prometheus
52+
53+
logging:
54+
level:
55+
p6spy: WARN
56+
57+
admin:
58+
domain: ${DEV_ADMIN_DOMAIN}
59+
60+
kakao:
61+
map_api_host: https://dapi.kakao.com
62+
rest_api_key: ${KAKAO_REST_API_KEY}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
server:
2+
forward-headers-strategy: framework
3+
4+
spring:
5+
mvc:
6+
hidden-method:
7+
filter:
8+
enabled: true
9+
docker:
10+
compose:
11+
enabled: false
12+
datasource:
13+
driver-class-name: oracle.jdbc.OracleDriver
14+
url: ${PROD_OCI_DB_URL}?TNS_ADMIN=/wallet
15+
username: ${PROD_OCI_DB_USERNAME}
16+
password: ${PROD_OCI_DB_PASSWORD}
17+
18+
jwt:
19+
secret_key: ${PROD_JWT_SECRET_KEY}
20+
access_token_expiration_times: ${PROD_ACCESS_TOKEN_EXPIRATION_TIMES}
21+
refresh_token_expiration_times: ${PROD_REFRESH_TOKEN_EXPIRATION_TIMES}
22+
23+
fcm:
24+
type: service_account
25+
project_id: yappu-world
26+
private_key_id: ${FCM_PRIVATE_KEY_ID}
27+
private_key: ${FCM_PRIVATE_KEY}
28+
client_email: ${FCM_CLIENT_EMAIL}
29+
client_id: ${FCM_CLIENT_ID}
30+
auth_uri: https://accounts.google.com/o/oauth2/auth
31+
token_uri: https://oauth2.googleapis.com/token
32+
auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
33+
client_x509_cert_url: ${FCM_X509_CERT_URL}
34+
universe_domain: googleapis.com
35+
36+
discord:
37+
webhook: ${DISCORD_WEBHOOK_URL_IN_PROD}
38+
39+
sentry:
40+
dsn: ${SENTRY_DSN}
41+
environment: prod
42+
traces-sample-rate: 1.0
43+
logging:
44+
minimum-event-level: warn
45+
minimum-breadcrumb-level: info
46+
47+
management:
48+
endpoints:
49+
web:
50+
exposure:
51+
include: prometheus
52+
53+
logging:
54+
level:
55+
p6spy: WARN
56+
57+
admin:
58+
domain: ${PROD_DOMAIN_ADMIN}
59+
60+
kakao:
61+
map_api_host: https://dapi.kakao.com
62+
rest_api_key: ${KAKAO_REST_API_KEY}

0 commit comments

Comments
 (0)