@@ -86,11 +86,11 @@ are therefore not mandatory to set
86
86
87
87
| environment variable | description |
88
88
| ----------------------| ----------------------|
89
- | ` PORT ` | The application port |
89
+ | ` DM_PORT ` | The application port |
90
90
| ` USER_DB_DRIVER ` | The database driver |
91
91
92
92
``` properties
93
- server.port =${PORT :8080}
93
+ server.port =${DM_PORT :8080}
94
94
spring.datasource.driver-class-name =${USER_DB_DRIVER:com.mysql.cj.jdbc.Driver}
95
95
```
96
96
@@ -100,7 +100,8 @@ As the application needs to send emails, you have to configure an smtp server as
100
100
| ----------------------| ------------------------------------------------------|
101
101
| ` MAIL_HOST ` | The smtp server host (e.g. smtp.gmail.com) |
102
102
| ` MAIL_PASSWORD ` | The password to authenticate against the mail server |
103
- | ` Mail_USERNAME ` | The username to authenticate against the mail server |
103
+ | ` MAIL_USERNAME ` | The username to authenticate against the mail server |
104
+ | ` MAIL_PORT ` | The port to use for the SMTP connection |
104
105
105
106
``` properties
106
107
spring.mail.username =${MAIL_USERNAME}
@@ -114,18 +115,31 @@ the following properties:
114
115
115
116
| environment variable | description |
116
117
| --------------------------------| -------------------------------------------------------------------|
117
- | ` HOST ` | The server address |
118
+ | ` DM_SERVICE_HOST ` | The server address (if behind a proxy, the proxy domain name) |
119
+ | ` DM_HOST_PROTOCOL ` | The server protocol (http or https) |
120
+ | ` DM_SERVICE_PORT ` | The server port (-1 for default) |
118
121
| ` EMAIL_CONFIRMATION_PARAMETER ` | The name of the parameter to which to pass the confirmation token |
119
- | ` LOGIN_ENDPOINT ` | The endpoint for the login |
122
+ | ` EMAIL_CONFIRMATION_ENDPOINT ` | The endpoint for the email configuration entry |
123
+ | ` PASSWORD_RESET_ENDPOINT ` | The endpoint for the password reset entry |
124
+ | ` PASSWORD_RESET_PARAMETER ` | The name for the password reset query parameter in the URL |
120
125
121
126
Generated email confirmation links will look like ` localhost:8080/login?confirm-email=<token> ` with
122
127
the
123
128
default configuration.
124
129
125
130
``` properties
126
- host.name =${HOST:localhost}
127
- login-endpoint =${LOGIN_ENDPOINT:login}
131
+ # global service route configuration for email interaction requests
132
+ service.host.name =${DM_SERVICE_HOST:localhost}
133
+ service.host.protocol =${DM_HOST_PROTOCOL:https}
134
+ service.host.port =${DM_SERVICE_PORT:-1}
135
+
136
+ # route for email confirmation consumption
137
+ email-confirmation-endpoint =${EMAIL_CONFIRMATION_ENDPOINT:login}
128
138
email-confirmation-parameter =${EMAIL_CONFIRMATION_PARAMETER:confirm-email}
139
+
140
+ # route for password reset
141
+ password-reset-endpoint =${PASSWORD_RESET_ENDPOINT:new-password}
142
+ password-reset-parameter =${PASSWORD_RESET_PARAMETER:user-id}
129
143
```
130
144
131
145
#### Properties
@@ -134,18 +148,41 @@ The environment variables can either be set in the runtime configuration of your
134
148
the [ application properties file] ( https://github.com/qbicsoftware/data-manager-app/blob/main/webapp/src/main/resources/application.properties ) :
135
149
136
150
``` properties
151
+ server.port =${DM_PORT:8080}
152
+ logging.level.org.atmosphere =warn
153
+ spring.mustache.check-template-location =false
154
+ # Launch the default browser when starting the application in development mode
155
+ vaadin.launch-browser =true
156
+ # To improve the performance during development.
157
+ # For more information https://vaadin.com/docs/flow/spring/tutorial-spring-configuration.html#special-configuration-parameters
158
+ vaadin.whitelisted-packages =com.vaadin,org.vaadin,dev.hilla,life.qbic
159
+ # Database setup configuration
137
160
spring.datasource.url =${USER_DB_URL:localhost}
161
+ spring.datasource.driver-class-name =${USER_DB_DRIVER:com.mysql.cj.jdbc.Driver}
138
162
spring.datasource.username =${USER_DB_USER_NAME:myusername}
139
163
spring.datasource.password =${USER_DB_USER_PW:astrongpassphrase!}
140
- server.port =${PORT:8080}
141
- spring.datasource.driver-class-name =${USER_DB_DRIVER:com.mysql.cj.jdbc.Driver}
164
+ spring.jpa.hibernate.ddl-auto =update
165
+
166
+ # email configuration
142
167
spring.mail.username =${MAIL_USERNAME}
143
168
spring.mail.password =${MAIL_PASSWORD}
144
169
spring.mail.host =${MAIL_HOST:smtp.gmail.com}
170
+ spring.mail.default-encoding =UTF-8
145
171
spring.mail.port =${MAIL_PORT:587}
146
- host.name =${HOST:localhost}
147
- login-endpoint =${LOGIN_ENDPOINT:login}
172
+
173
+ # global service route configuration for email interaction requests
174
+ service.host.name =${DM_SERVICE_HOST:localhost}
175
+ service.host.protocol =${DM_HOST_PROTOCOL:https}
176
+ service.host.port =${DM_SERVICE_PORT:-1}
177
+
178
+ # route for email confirmation consumption
179
+ email-confirmation-endpoint =${EMAIL_CONFIRMATION_ENDPOINT:login}
148
180
email-confirmation-parameter =${EMAIL_CONFIRMATION_PARAMETER:confirm-email}
181
+
182
+ # route for password reset
183
+ password-reset-endpoint =${PASSWORD_RESET_ENDPOINT:new-password}
184
+ password-reset-parameter =${PASSWORD_RESET_PARAMETER:user-id}
185
+
149
186
```
150
187
151
188
### Local testing
0 commit comments