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'
annotationProcessor 'org.projectlombok:lombok'
implementation 'org.mariadb.jdbc:mariadb-java-client'
implementation 'org.postgresql:postgresql'
implementation "org.springframework.boot:spring-boot-starter-security"
implementation "com.auth0:java-jwt:3.10.2"

View File

@ -1,5 +1,5 @@
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.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:
context: ./sql
volumes:
- "qbc-db-data:/var/lib/mysql"
- "db-data:/var/lib/postgresql/data"
environment:
MYSQL_DATABASE: geotime
MYSQL_ROOT_PASSWORD: supersecure
POSTGRES_DB: geotime
POSTGRES_PASSWORD: supersecure
POSTGRES_USER: root
volumes:
qbc-db-data:
db-data:

View File

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