Skip to content

Commit

Permalink
feat: Connect rds
Browse files Browse the repository at this point in the history
  • Loading branch information
devmizz committed Jul 20, 2024
1 parent 7eabcb4 commit 022e7db
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 35 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/showpot-dev-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ jobs:
- name: Copy Secrets
uses: microsoft/variable-substitution@v1
with:
files: './app/src/main/resources/application-dev.yml, ./app/src/main/resources/application-cloud-dev.yml'
files: './app/src/main/resources/application-dev.yml, ./app/src/main/resources/application-cloud-dev.yml, ./app/domain/common-domain/src/main/resources/application-domain-dev.yml'
env:
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }}
cloud.aws.region: ${{ secrets.AWS_REGION }}
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }}
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_DEV }}
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME }}
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD }}

- name: Build with Gradle Wrapper
run: ./gradlew clean build
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/showpot-dev-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,16 @@ jobs:
- name: Copy Secrets
uses: microsoft/variable-substitution@v1
with:
files: './app/src/main/resources/application-dev.yml, ./app/src/main/resources/application-cloud-dev.yml'
files: './app/src/main/resources/application-dev.yml, ./app/src/main/resources/application-cloud-dev.yml, ./app/domain/common-domain/src/main/resources/application-domain-dev.yml'
env:
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }}
cloud.aws.region: ${{ secrets.AWS_REGION }}
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }}
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_DEV }}
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME }}
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD }}

- name: Build with Gradle Wrapper
run: ./gradlew clean build
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/showpot-prod-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ jobs:
- name: Copy Secrets
uses: microsoft/variable-substitution@v1
with:
files: ./app/src/main/resources/application-cloud-prod.yml
files: './app/src/main/resources/application-dev.yml, ./app/src/main/resources/application-cloud-dev.yml, ./app/domain/common-domain/src/main/resources/application-domain-dev.yml'
env:
token.secret-key: ${{ secrets.TOKEN_SECRET_KEY }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_SECRET_KEY }}
cloud.aws.region: ${{ secrets.AWS_REGION }}
cloud.aws.s3.bucket: ${{ secrets.AWS_BUCKET }}
spring.datasource.url: ${{ secrets.APPLICATION_DATASOURCE_URL_DEV }}
spring.datasource.username: ${{ secrets.APPLICATION_DATASOURCE_USERNAME }}
spring.datasource.password: ${{ secrets.APPLICATION_DATASOURCE_PASSWORD }}

- name: Build with Gradle Wrapper
run: ./gradlew clean build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
spring:
jpa:
hibernate:
ddl-auto: create
show-sql: true
open-in-view: false
generate-ddl: true
jpa:
hibernate:
ddl-auto: none
show-sql: true
datasource:
url: ${APPLICATION_DATASOURCE_URL_DEV}
username: ${APPLICATION_DATASOURCE_USERNAME}
password: ${APPLICATION_DATASOURCE_PASSWORD}
driver-class-name: org.postgresql.Driver
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
spring:
jpa:
hibernate:
ddl-auto: none
show-sql: true
datasource:
url: ${APPLICATION_DATASOURCE_URL_PROD}
username: ${APPLICATION_DATASOURCE_USERNAME}
password: ${APPLICATION_DATASOURCE_PASSWORD}
driver-class-name: org.postgresql.Driver
13 changes: 0 additions & 13 deletions docker-compose-local.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
services:
postgresql:
container_name: yapp_postgresql
image: postgres:14
environment:
POSTGRES_DB: yapp
POSTGRES_USER: yapp
POSTGRES_PASSWORD: yapp
ports:
- '5432:5432'
restart: always
networks:
- app-network

redis:
container_name: yapp_redis
image: redis:alpine
Expand Down
13 changes: 0 additions & 13 deletions docker-compose-prod.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,4 @@
services:
postgresql:
container_name: yapp_postgresql
image: postgres:14
environment:
POSTGRES_DB: yapp
POSTGRES_USER: yapp
POSTGRES_PASSWORD: yapp
ports:
- '5432:5432'
restart: always
networks:
- app-network

redis:
container_name: yapp_redis
image: redis:alpine
Expand Down

0 comments on commit 022e7db

Please sign in to comment.