feat(db): add postgres setup and multi-tenant config
This commit is contained in:
26
src/main/resources/application.yml
Normal file
26
src/main/resources/application.yml
Normal file
@@ -0,0 +1,26 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://${POSTGRES_HOST:localhost}:${POSTGRES_PORT:5432}/${POSTGRES_DB:smartseat_db}
|
||||
username: ${POSTGRES_USER:postgres_admin}
|
||||
password: ${POSTGRES_PASSWORD:change_me_super_secret_admin_password}
|
||||
driver-class-name: org.postgresql.Driver
|
||||
hikari:
|
||||
maximum-pool-size: 20
|
||||
minimum-idle: 5
|
||||
idle-timeout: 300000
|
||||
connection-timeout: 20000
|
||||
max-lifetime: 1200000
|
||||
leak-detection-threshold: 5000
|
||||
pool-name: CasposHikariCP
|
||||
|
||||
jpa:
|
||||
database-platform: org.hibernate.dialect.PostgreSQLDialect
|
||||
hibernate:
|
||||
ddl-auto: validate
|
||||
properties:
|
||||
hibernate:
|
||||
multiTenancy: SCHEMA
|
||||
multi_tenant_connection_provider: com.caspos.config.tenant.SchemaBasedMultiTenantConnectionProvider
|
||||
tenant_identifier_resolver: com.caspos.config.tenant.TenantIdentifierResolver
|
||||
format_sql: true
|
||||
show_sql: false
|
||||
Reference in New Issue
Block a user