From e01e8a49adcb553f4f4106ad8131afe4c79fe9e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Fri, 3 Jan 2025 16:07:56 +0900 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20MariaDB=20->=20MySQL=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- build.gradle | 2 +- src/main/resources/application.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cc09606..28a4f7f 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,14 @@ # 기술스택 + 프레임워크 : SpringBoot 3.0.9 + 언어 : Java 17 -+ 데이터베이스 : MariaDB ++ 데이터베이스 : MySQL + 인프라 : AWS EC2 + CI/CD: GitHub Actions
# Environment -```java +``` # Cors 관련 환경변수 CORS_ORIGIN_DEVELOPMENT= CORS_ORIGIN_PRODUCTION= diff --git a/build.gradle b/build.gradle index 313c7c9..1c8faca 100644 --- a/build.gradle +++ b/build.gradle @@ -35,7 +35,7 @@ dependencies { compileOnly 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' - runtimeOnly 'org.mariadb.jdbc:mariadb-java-client' + runtimeOnly 'com.mysql:mysql-connector-j' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index b1f6aa8..92e5d9d 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -5,14 +5,14 @@ spring: profiles: default: dev datasource: - driver-class-name: org.mariadb.jdbc.Driver + driver-class-name: com.mysql.cj.jdbc.Driver username: ${DATABASE_USERNAME} url: ${DATABASE_URL} password: ${DATABASE_PASSWORD} jpa: properties: hibernate: - dialect: org.hibernate.dialect.MariaDBDialect + dialect: org.hibernate.dialect.MySQLDialect format_sql: true use_sql_comments: true show_sql: true From 5d5e788548be508294e622b7c7129868973ef53c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=85=B8=EC=A0=95=EC=99=84?= Date: Sat, 4 Jan 2025 03:12:33 +0900 Subject: [PATCH 2/2] =?UTF-8?q?build:=20=EB=B0=B0=ED=8F=AC=20=EB=B0=A9?= =?UTF-8?q?=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{leets-actions.yml => ci-cd.yml} | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) rename .github/workflows/{leets-actions.yml => ci-cd.yml} (67%) diff --git a/.github/workflows/leets-actions.yml b/.github/workflows/ci-cd.yml similarity index 67% rename from .github/workflows/leets-actions.yml rename to .github/workflows/ci-cd.yml index 76a77ae..afc4b15 100644 --- a/.github/workflows/leets-actions.yml +++ b/.github/workflows/ci-cd.yml @@ -7,31 +7,27 @@ on: - 'releases/**' env: - AWS_REGION: ap-northeast-2 - AWS_S3_BUCKET: gitactionbucket - AWS_CODE_DEPLOY_APPLICATION: cicd-test-cd - AWS_CODE_DEPLOY_GROUP: cicd-test-cd-group APPLICATION: ${{ secrets.APPLICATION }} WORKING_DIRECTORY: ./ jobs: build-with-gradle: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - - name: JDK 17 설치 - uses: actions/setup-java@v3 + - name: JDK 17 설정 + uses: actions/setup-java@v4 with: java-version: '17' distribution: 'corretto' - - name: 환경변수 설정 + - name: applications.yml 환경변수 설정 run: | echo "${{env.APPLICATION}}" > ./src/main/resources/application.yml - - name: gradlew에 실행 권한 부여 + - name: gradlew 실행 권한 부여 run: chmod +x gradlew working-directory: ${{ env.WORKING_DIRECTORY }} @@ -57,7 +53,5 @@ jobs: key: ${{ secrets.REMOTE_IDENTITYFILE }} port: ${{ secrets.REMOTE_PORT }} script: | - cd server - docker compose -f docker-compose.yml down leets-be - docker compose -f docker-compose.yml pull leets-be - docker compose -f docker-compose.yml up -d leets-be + cd docker-compose + sudo ./deploy.sh