diff --git a/Procfile b/Procfile new file mode 100644 index 0000000..71b455f --- /dev/null +++ b/Procfile @@ -0,0 +1 @@ +web: java $JAVA_OPTS -Dserver.port=$PORT -Dspring.profiles.active=heroku -jar build/libs/test-data-v1.0.jar \ No newline at end of file diff --git a/build.gradle b/build.gradle index e18fc4c..85b67d3 100644 --- a/build.gradle +++ b/build.gradle @@ -5,7 +5,7 @@ plugins { } group = 'org.leedae' -version = '0.0.1-SNAPSHOT' +version = 'v1.0' java { toolchain { @@ -44,3 +44,10 @@ tasks.named('test') { useJUnitPlatform() jvmArgs('-Xshare:off', '-XX:+EnableDynamicAgentLoading') } + +//heroku 설정 +jar{ + manifest { + attributes 'Main-Class': 'org.leedae.testdata.TestDataApplication' + } +} diff --git a/src/main/resources/application.yaml b/src/main/resources/application.yaml index f81e35c..9bfa826 100644 --- a/src/main/resources/application.yaml +++ b/src/main/resources/application.yaml @@ -33,3 +33,13 @@ spring: config.activate.on-profile: test datasource.url: jdbc:h2:mem:testdb;MODE=MySQL;DATABASE_TO_LOWER=TRUE + +--- +spring: + config.activate.on-profile: heroku + datasource: + url: ${JAWSDB_URL} + jpa: + hibernate.ddl-auto: create + defer-datasource-initialization: true + sql.init.mode: always \ No newline at end of file diff --git a/system.properties b/system.properties new file mode 100644 index 0000000..ec9df9a --- /dev/null +++ b/system.properties @@ -0,0 +1 @@ +java.runtime.version=21 \ No newline at end of file