Switch to postgres database in backend

This commit is contained in:
Marcel Schwarz 2020-06-12 03:29:47 +02:00
parent f9ce4d4db8
commit 2634256f02
4 changed files with 9 additions and 7 deletions

View File

@ -22,6 +22,7 @@ dependencies {
compileOnly 'org.projectlombok:lombok' compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok'
implementation 'org.mariadb.jdbc:mariadb-java-client' implementation 'org.mariadb.jdbc:mariadb-java-client'
implementation 'org.postgresql:postgresql'
implementation "org.springframework.boot:spring-boot-starter-security" implementation "org.springframework.boot:spring-boot-starter-security"
implementation "com.auth0:java-jwt:3.10.2" implementation "com.auth0:java-jwt:3.10.2"

View File

@ -1,5 +1,5 @@
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mariadb://db:3306/geotime spring.datasource.url=jdbc:postgresql://db:5432/geotime
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=supersecure spring.datasource.password=supersecure
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.datasource.driver-class-name=org.postgresql.Driver

View File

@ -26,10 +26,11 @@ services:
build: build:
context: ./sql context: ./sql
volumes: volumes:
- "qbc-db-data:/var/lib/mysql" - "db-data:/var/lib/postgresql/data"
environment: environment:
MYSQL_DATABASE: geotime POSTGRES_DB: geotime
MYSQL_ROOT_PASSWORD: supersecure POSTGRES_PASSWORD: supersecure
POSTGRES_USER: root
volumes: volumes:
qbc-db-data: db-data:

View File

@ -1,2 +1,2 @@
FROM mariadb FROM postgres
ENV TZ=Europe/Berlin ENV TZ=Europe/Berlin