From 7cbb67c9c4123ecb71364a1b72cb27a4c1100e56 Mon Sep 17 00:00:00 2001 From: jisubaek Date: Mon, 28 Apr 2025 18:15:59 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feature:=20deploy=20test/dockerfile,propert?= =?UTF-8?q?ies=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 11 +++++++++++ src/main/resources/application.yml | 10 ++++++---- 2 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4e8b4df --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM openjdk:21-jdk-slim + +WORKDIR /app + +COPY build/libs/*.jar app.jar + +ENV SPRING_PROFILES_ACTIVE=prod + +EXPOSE 8080 + +ENTRYPOINT ["java", "-jar", "app.jar"] diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index cb6bbcd..a7d14fc 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,13 +1,15 @@ spring: application: name: crew -#JPA + #JPA datasource: - driver-class-name: org.h2.Driver - url: jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MySQL + driver-class-name: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://retripstudydb.cv4sss0i0mk8.ap-southeast-2.rds.amazonaws.com:3306/crew?serverTimezone=Asia/Seoul&characterEncoding=UTF-8 + username: ${DB_USERNAME} + password: ${DB_PASSWORD} jpa: hibernate: - ddl-auto: create-drop + ddl-auto: update properties: hibernate: show_sql: true From a7e31c5a360f8d479fcaab7103ea1a79ef673fd3 Mon Sep 17 00:00:00 2001 From: jisubaek Date: Mon, 28 Apr 2025 19:03:35 +0900 Subject: [PATCH 2/2] =?UTF-8?q?deploy:=20mysql=20=EB=93=9C=EB=9D=BC?= =?UTF-8?q?=EC=9D=B4=EB=B2=84=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 3c88f9e..7596bba 100644 --- a/build.gradle +++ b/build.gradle @@ -30,7 +30,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation "org.springdoc:springdoc-openapi-starter-webmvc-api:2.8.5" implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.8.5" - + implementation 'mysql:mysql-connector-java:8.0.33' compileOnly 'org.projectlombok:lombok' runtimeOnly 'com.h2database:h2'