-
Notifications
You must be signed in to change notification settings - Fork 2
/
application.yml
192 lines (169 loc) · 6.46 KB
/
application.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# This file was autogenerated via configs-generator
# Please do not edit it manually.
logging.level.root: INFO
logging.level.org.hibernate.engine.internal.StatisticalLoggingSessionEventListener: WARN
logging.level.org.apache.tomcat.util.modeler.Registry: ERROR
custom.base-url: "http://localhost:${server.port}"
# https://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-email.html
# https://yandex.ru/support/mail-new/mail-clients.html
# https://stackoverflow.com/questions/411331/using-javamail-with-tls
spring.mail:
testConnection: false
host: 127.0.0.1
port: 3025
username: testEmailUsername
password: testEmailPassword
properties:
# mail.smtp.starttls.enable: "true"
# mail.smtp.ssl.enable: "true"
mail.smtp.connectiontimeout: 5000
mail.smtp.timeout: 3000
mail.smtp.writetimeout: 5000
custom.stomp.broker:
host: "127.0.0.1"
port: 60613
virtual-host: /
client-login: blog
client-password: blogPazZw0rd
system-login: blog
system-password: blogPazZw0rd
# Postgres image store configuration
custom.image:
max-bytes: 4194304 # 4 Mb. Must be < than tomcat file upload limit. see also spring.servlet.multipart.*
allowed-mime-types:
- image/png
- image/jpg
- image/jpeg
# value in seconds, passed in Cache-Control header
max-age: 31536000
spring.session.timeout: 2d
custom:
email:
from: testEmailUsername@test.example.com
registration:
email:
subject: "Registration confirmation"
text-template: "Please open __REGISTRATION_LINK_PLACEHOLDER__ for complete registration __LOGIN__."
confirmation:
registration:
token:
ttl-minutes: 5
password-reset:
email:
subject: "Password reset"
text-template: "Link __PASSWORD_RESET_LINK_PLACEHOLDER__ for reset your password for account __LOGIN__. If you didn't issue password reset -- you can ignore this mail."
token:
ttl-minutes: 5
tasks:
enable: false
poolSize: 10
defaultLockAtMostForSec: 20
defaultLockAtLeastForSec: 20
images.clean:
cron: "0 * * * * *"
rendertron.cache.refresh:
cron: "0 */30 * * * *"
elasticsearch.refresh:
cron: "0 0 */2 * * *"
rendertron:
serviceUrl: http://rendertron.example.com:3000/
xss:
iframe:
allow:
src:
pattern: '^(https://www\.youtube\.com.*)|(https://coub\.com/.*)|(https://player\.vimeo\.com.*)|(https://asciinema\.org.*)$'
server.port: 9080
server.tomcat.basedir: ${java.io.tmpdir}/com.github.nkonev.tomcat
server.servlet.session.store-dir: ${server.tomcat.basedir}/sessions
spring.servlet.multipart.max-file-size: 6MB
spring.servlet.multipart.max-request-size: 8MB
server.servlet.encoding.force-response: true
# this is URL
spring.mvc.static-path-pattern: /**
# You need to remove "file:..." element for production or you can to remove spring.resources.static-locations
# first element - for eliminate manual restart app in IntelliJ for copy compiled js to target/classes, last slash is important,, second element - for documentation
spring.resources.static-locations: file:../backend/src/main/resources/static/, classpath:/static/
custom.selenium.implicitly-wait-timeout: 10
custom.selenium.browser: CHROME
custom.selenium.window-height: 900
custom.selenium.window-width: 1600
custom.selenium.selenide-condition-timeout: 10
custom.selenium.selenide-collections-timeout: 10
custom.it.url.prefix: http://localhost:${server.port}
custom.it.user.id: 1
custom.it.user: admin
custom.it.password: admin
spring.datasource:
name: blog_ds
type: org.apache.tomcat.jdbc.pool.DataSource
# https://jdbc.postgresql.org/documentation/head/connect.html#connection-parameters
url: jdbc:postgresql://127.0.0.1:25432/blog?connectTimeout=10&socketTimeout=40
username: blog
password: "blogPazZw0rd"
driverClassName: org.postgresql.Driver
# https://docs.spring.io/spring-boot/docs/2.0.0.M7/reference/htmlsingle/#boot-features-connect-to-production-database
# https://tomcat.apache.org/tomcat-8.5-doc/jdbc-pool.html#Common_Attributes
# https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#boot-features-connect-to-production-database
tomcat:
minIdle: 4
maxIdle: 8
maxActive: 10
maxWait: 60000
testOnBorrow: true
testOnConnect: true
testWhileIdle: true
timeBetweenEvictionRunsMillis: 5000
validationQuery: SELECT 1;
validationQueryTimeout: 4
logValidationErrors: true
# https://docs.spring.io/spring-boot/docs/2.0.0.M7/reference/htmlsingle/#howto-execute-flyway-database-migrations-on-startup
# https://flywaydb.org/documentation/configfiles
spring.flyway:
locations: classpath:/db/migration, classpath:/db/demo
drop-first: true
schemas: migrations, auth, posts, images, settings
out-of-order: true
spring.redis.url: redis://127.0.0.1:26379/0
spring.data.redis.repositories.enabled: false
spring:
elasticsearch:
rest:
uris: 127.0.0.1:29200
read-timeout: 30s
connection-timeout: 5s
spring.data.elasticsearch.repositories.enabled: false
management.endpoints.web.exposure.include: '*'
management.endpoint.health.show-details: always
management:
server:
port: 3011
ssl:
enabled: false
add-application-context-header: false
custom.rendertron.enable.async.cache.refresh: false
spring.security:
oauth2:
client:
registration:
vkontakte:
client-id: 6805077
client-secret: your-app-client-secret
authorization-grant-type: authorization_code
redirect-uri: "{baseUrl}/api/login/oauth2/code/{registrationId}"
client-authentication-method: post
facebook:
client-name: "facebook" # use in BlogOAuth2UserService
client-id: 1684113965162824
client-secret: your-app-client-secret
redirect-uri: "{baseUrl}/api/login/oauth2/code/{registrationId}"
provider:
vkontakte:
authorization-uri: http://127.0.0.1:10081/mock/vkontakte/authorize
token-uri: http://127.0.0.1:10081/mock/vkontakte/access_token
user-info-uri: http://127.0.0.1:10081/mock/vkontakte/method/users.get?v=5.92
user-info-authentication-method: form
user-name-attribute: response
facebook:
authorization-uri: http://127.0.0.1:10080/mock/facebook/dialog/oauth
token-uri: http://127.0.0.1:10080/mock/facebook/oauth/access_token
user-info-uri: http://127.0.0.1:10080/mock/facebook/me?fields=id,name,picture