Introduce deployment profiles as a cheap way for multi-tenancy
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
<properties>
|
||||
<packaging.type>jar</packaging.type>
|
||||
<activeProfiles>hsqldb,dev</activeProfiles>
|
||||
<db.name>financer</db.name>
|
||||
<deploymentProfile>mk</deploymentProfile>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -111,10 +111,10 @@
|
||||
<id>build-war</id>
|
||||
<properties>
|
||||
<packaging.type>war</packaging.type>
|
||||
<activeProfiles>postgres</activeProfiles>
|
||||
<activeProfiles>postgres,${deploymentProfile}</activeProfiles>
|
||||
</properties>
|
||||
<build>
|
||||
<finalName>${project.artifactId}##${parallelDeploymentVersion}</finalName>
|
||||
<finalName>${project.artifactId}-${deploymentProfile}##${parallelDeploymentVersion}</finalName>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
spring.datasource.url=jdbc:postgresql://localhost/financer_mk
|
||||
spring.datasource.username=financer_mk
|
||||
spring.datasource.password=financer_mk
|
||||
|
||||
financer.mailRecipients[0]=marius@kleberonline.de
|
||||
@@ -0,0 +1,5 @@
|
||||
spring.datasource.url=jdbc:postgresql://localhost/financer_nm
|
||||
spring.datasource.username=financer_nm
|
||||
spring.datasource.password=financer_nm
|
||||
|
||||
financer.mailRecipients[0]=niklas@mueller.com
|
||||
@@ -1,11 +1,8 @@
|
||||
spring.flyway.locations=classpath:/database/postgres,classpath:/database/common
|
||||
|
||||
# Placeholder @db.name@ maps to the property db.name in the server POM.
|
||||
# Its default value is 'financer'
|
||||
# Enables easy configuration of DB name/user to use at build time
|
||||
spring.datasource.url=jdbc:postgresql://localhost/@db.name@
|
||||
spring.datasource.username=@db.name@
|
||||
spring.datasource.password=@db.name@
|
||||
spring.datasource.url=jdbc:postgresql://localhost/financer
|
||||
spring.datasource.username=financer
|
||||
spring.datasource.password=financer
|
||||
|
||||
# See https://github.com/spring-projects/spring-boot/issues/12007
|
||||
spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
spring.profiles.active=@activeProfiles@
|
||||
|
||||
# Only valid for embedded Tomcat
|
||||
server.servlet.context-path=/financer-server
|
||||
server.port=8089
|
||||
|
||||
@@ -34,7 +35,7 @@ financer.state=sl
|
||||
financer.dateFormat=dd.MM.yyyy
|
||||
|
||||
# A collection of email addresses that should receive mails from financer
|
||||
financer.mailRecipients[0]=marius@kleberonline.de
|
||||
financer.mailRecipients[0]=
|
||||
|
||||
# The from address used in emails send by financer
|
||||
financer.fromAddress=financer@77zzcx7.de
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
paths. Default is the artifactId, the build-war profile defines its own default.
|
||||
Can be changed at build time via 'mvn ... -DfinalName=financer ...-->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<deploymentProfile>mk</deploymentProfile>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
@@ -85,11 +86,11 @@
|
||||
<id>build-war</id>
|
||||
<properties>
|
||||
<packaging.type>war</packaging.type>
|
||||
<activeProfiles>postgres</activeProfiles>
|
||||
<activeProfiles>${deploymentProfile}</activeProfiles>
|
||||
<finalName>financer</finalName>
|
||||
</properties>
|
||||
<build>
|
||||
<finalName>${finalName}##${parallelDeploymentVersion}</finalName>
|
||||
<finalName>${finalName}-${deploymentProfile}##${parallelDeploymentVersion}</finalName>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
financer.serverUrl=http://localhost:8080/financer-server-mk/
|
||||
@@ -0,0 +1,2 @@
|
||||
financer.serverUrl=http://localhost:8080/financer-server-nm/
|
||||
financer.monthPeriodStartDay=1
|
||||
Reference in New Issue
Block a user