switch to postgres db (#444)

This commit is contained in:
rti
2022-10-11 20:02:45 +02:00
committed by GitHub
parent a95c40dd05
commit d61c8a5f96
2 changed files with 13 additions and 17 deletions

View File

@@ -6,18 +6,15 @@ services:
restart: on-failure restart: on-failure
ports: ports:
- "8080:8080" - "8080:8080"
hapi-fhir-mysql: hapi-fhir-postgres:
image: mysql:latest image: postgres:13-alpine
container_name: hapi-fhir-mysql container_name: hapi-fhir-postgres
#https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html
command: --lower_case_table_names=1
restart: always restart: always
environment: environment:
MYSQL_DATABASE: 'hapi' POSTGRES_DB: "hapi"
MYSQL_USER: 'admin' POSTGRES_USER: "admin"
MYSQL_PASSWORD: 'admin' POSTGRES_PASSWORD: "admin"
MYSQL_ROOT_PASSWORD: 'admin'
volumes: volumes:
- hapi-fhir-mysql:/var/lib/mysql - hapi-fhir-postgres:/var/lib/postgresql/data
volumes: volumes:
hapi-fhir-mysql: hapi-fhir-postgres:

View File

@@ -14,11 +14,10 @@ spring:
check-location: false check-location: false
baselineOnMigrate: true baselineOnMigrate: true
datasource: datasource:
url: 'jdbc:h2:file:./target/database/h2' url: jdbc:postgresql://hapi-fhir-postgres:5432/hapi
#url: jdbc:h2:mem:test_mem username: admin
username: sa password: admin
password: null driverClassName: org.postgresql.Driver
driverClassName: org.h2.Driver
max-active: 15 max-active: 15
# database connection pool size # database connection pool size
@@ -32,7 +31,7 @@ spring:
#If using H2, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect #If using H2, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect
#If using postgres, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect #If using postgres, then supply the value of ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect
hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirH2Dialect hibernate.dialect: ca.uhn.fhir.jpa.model.dialect.HapiFhirPostgres94Dialect
# hibernate.hbm2ddl.auto: update # hibernate.hbm2ddl.auto: update
# hibernate.jdbc.batch_size: 20 # hibernate.jdbc.batch_size: 20
# hibernate.cache.use_query_cache: false # hibernate.cache.use_query_cache: false