Add dev and prod profile, Add MariaDB connector
Prod is default Add IDEA Run Configs for DEV (IDEA) and PROD (Docker-Compose)
This commit is contained in:
parent
496394dac1
commit
2c7418529b
@ -1,7 +1,8 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="GeotimeApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||
<configuration default="false" name="GeotimeApplication [DEV]" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot">
|
||||
<module name="geotime.main" />
|
||||
<option name="SPRING_BOOT_MAIN_CLASS" value="de.hft.geotime.GeotimeApplication" />
|
||||
<option name="ACTIVE_PROFILES" value="dev" />
|
||||
<option name="ALTERNATIVE_JRE_PATH" />
|
||||
<method v="2">
|
||||
<option name="Make" enabled="true" />
|
@ -1,5 +1,5 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Run Compose" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
|
||||
<configuration default="false" name="Run Compose [PROD]" type="docker-deploy" factoryName="docker-compose.yml" server-name="Docker">
|
||||
<deployment type="docker-compose.yml">
|
||||
<settings>
|
||||
<option name="removeVolumesOnComposeDown" value="true" />
|
@ -17,6 +17,7 @@ dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-rest'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||
implementation 'org.mariadb.jdbc:mariadb-java-client:1.5.7'
|
||||
runtimeOnly 'com.h2database:h2'
|
||||
testImplementation('org.springframework.boot:spring-boot-starter-test') {
|
||||
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
|
||||
|
5
backend/src/main/resources/application-prod.properties
Normal file
5
backend/src/main/resources/application-prod.properties
Normal file
@ -0,0 +1,5 @@
|
||||
spring.jpa.hibernate.ddl-auto=update
|
||||
spring.datasource.url=jdbc:mariadb://db:3306/geotime
|
||||
spring.datasource.username=root
|
||||
spring.datasource.password=supersecure
|
||||
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
|
@ -1,2 +1,3 @@
|
||||
server.port=80
|
||||
spring.data.rest.basePath=/api
|
||||
spring.profiles.active=prod
|
@ -21,9 +21,11 @@ services:
|
||||
|
||||
db:
|
||||
container_name: qbc_database
|
||||
restart: always
|
||||
build:
|
||||
context: ./sql
|
||||
volumes:
|
||||
- "./sql/db-data:/var/lib/mysql"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "ubc-timetracking"
|
||||
MYSQL_DATABASE: geotime
|
||||
MYSQL_ROOT_PASSWORD: supersecure
|
Loading…
Reference in New Issue
Block a user