forked from michaelliao/itranswarp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
application.yml
164 lines (153 loc) · 6.21 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
# configuration for itranswarp:
# tomcat configuration:
server:
port: ${SERVER_PORT:2019}
spring:
profiles:
active: ${PROFILES:native}
application:
name: ${NAME:itranswarp}
# default to empty (use default timezone of server):
timezone: ${TIMEZONE:}
# mysql configuration:
datasource:
url: jdbc:mysql://${DB_HOST:localhost}:${DB_PORT:3306}/${DB_NAME:it}?useSSL=${DB_SSL:false}&characterEncoding=${DB_ENCODING:utf8}
username: ${DB_USERNAME:root}
password: ${DB_PASSWORD:password}
driver-class-name: com.mysql.jdbc.Driver
hikari:
pool-name: HikariCP
auto-commit: false
connection-timeout: ${DB_TIMEOUT:3000}
validation-timeout: ${DB_TIMEOUT:3000}
max-lifetime: ${DB_MAX_LIFETIME:600000}
maximum-pool-size: ${DB_POOL_SIZE:100}
minimum-idle: ${DB_MIN_IDLE:1}
# redis configuration:
redis:
standalone:
host: ${REDIS_HOST:localhost}
port: ${REDIS_PORT:6379}
database: ${REDIS_DATABASE:0}
password: ${REDIS_PASSWORD:}
timeout: ${REDIS_TIMEOUT:1}
# security configuration:
security:
encrypt:
key: ${ENCRYPT_KEY:ChangeTheKeyWhenDeployProduction}
# rate limit: how many requests per minute:
rate-limit:
error-code: ${RATE_LIMIT_ERROR_CODE:429}
limit: ${RATE_LIMIT_LIMIT:3}
burst: ${RATE_LIMIT_BURST:10}
anti-spam:
lock-days: ${ANTI_SPAM_LOCK_DAYS:3650}
# markdown configurations:
markdown:
plugins:
# convert link to Bilibili video player, e.g. https://www.bilibili.com/video/BV1XW411M7Gu
bilibili:
enabled: ${MARKDOWN_BILIBILI_ENABLED:true}
width: ${MARKDOWN_BILIBILI_WIDTH:100%}
height: ${MARKDOWN_BILIBILI_HEIGHT:480px}
# convert link to QQ video player, e.g. https://v.qq.com/x/cover/3nd6v5g14aoo20t/j0859o1tww8.html
qq-video:
enabled: ${MARKDOWN_QQ_VIDEO_ENABLED:true}
width: ${MARKDOWN_QQ_VIDEO_WIDTH:100%}
height: ${MARKDOWN_QQ_VIDEO_HEIGHT:480px}
# convert link to YouTube video player, e.g. https://www.youtube.com/watch?v=EaW6VcOzLT4
youtube:
enabled: ${MARKDOWN_YOUTUBE_ENABLED:true}
width: ${MARKDOWN_YOUTUBE_WIDTH:100%}
height: ${MARKDOWN_YOUTUBE_HEIGHT:480px}
# convert securities to TradingView chart, e.g. $$NASDAQ:AAPL$$
# search valid symbol name at https://www.tradingview.com/widget/advanced-chart/
trading-view:
enabled: ${MARKDOWN_TRADING_VIEW_ENABLED:true}
width: ${MARKDOWN_TRADING_VIEW_WIDTH:100%}
height: ${MARKDOWN_TRADING_VIEW_HEIGHT:480px}
# search configurations:
search:
lucene:
enabled: ${LUCENE_ENABLED:false}
index-dir: ${LUCENE_INDEX_DIR:/var/search-index}
elastic:
enabled: ${ELASTIC_SEARCH_ENABLED:false}
url: ${ELASTIC_SEARCH_URL:http://localhost:9200}
user: ${ELASTIC_SEARCH_USER:}
password: ${ELASTIC_SEARCH_PASSWORD:}
# 3rd-party signin configurations:
signin:
password:
# enable password signin:
enabled: ${SIGNIN_PASSWORD_ENABLED:true}
# oauth authentication configuration:
# - name: display name
# - icon: icon name, check https://getuikit.com/v2/docs/icon.html
# - color: the button css background color, must be quoted by "".
# an oauth provider is enabled if client-id and client-secret are both set.
oauth:
facebook:
name: "${OAUTH_FACEBOOK_NAME:Facebook}"
icon: "${OAUTH_FACEBOOK_ICON:facebook}"
color: "${OAUTH_FACEBOOK_COLOR:#3b5998}"
client-id: "${OAUTH_FACEBOOK_CLIENT_ID:}"
client-secret: "${OAUTH_FACEBOOK_CLIENT_SECRET:}"
github:
name: "${OAUTH_GITHUB_NAME:Github}"
icon: "${OAUTH_GITHUB_ICON:github}"
color: "${OAUTH_GITHUB_COLOR:#666666}"
client-id: "${OAUTH_GITHUB_CLIENT_ID:}"
client-secret: "${OAUTH_GITHUB_CLIENT_SECRET:}"
google:
name: "${OAUTH_GOOGLE_NAME:Google}"
icon: "${OAUTH_GOOGLE_ICON:google}"
color: "${OAUTH_GOOGLE_COLOR:#4285f4}"
client-id: "${OAUTH_GOOGLE_CLIENT_ID:}"
client-secret: "${OAUTH_GOOGLE_CLIENT_SECRET:}"
linkedin:
name: "${OAUTH_LINKEDIN_NAME:LinkedIn}"
icon: "${OAUTH_LINKEDIN_ICON:linkedin}"
color: "${OAUTH_LINKEDIN_COLOR:#007bb6}"
client-id: "${OAUTH_LINKEDIN_CLIENT_ID:}"
client-secret: "${OAUTH_LINKEDIN_CLIENT_SECRET:}"
microsoft:
name: "${OAUTH_MICROSOFT_NAME:Microsoft}"
icon: "${OAUTH_MICROSOFT_ICON:windows}"
color: "${OAUTH_MICROSOFT_COLOR:#2672ec}"
client-id: "${OAUTH_MICROSOFT_CLIENT_ID:}"
client-secret: "${OAUTH_MICROSOFT_CLIENT_SECRET:}"
qq:
name: "${OAUTH_QQ_NAME:QQ}"
icon: "${OAUTH_QQ_ICON:qq}"
color: "${OAUTH_QQ_COLOR:#00a8e6}"
client-id: "${OAUTH_QQ_CLIENT_ID:}"
client-secret: "${OAUTH_QQ_CLIENT_SECRET:}"
twitter:
name: "${OAUTH_TWITTER_NAME:Twitter}"
icon: "${OAUTH_TWITTER_ICON:facebook}"
color: "${OAUTH_TWITTER_COLOR:#1da1f2}"
client-id: "${OAUTH_TWITTER_CLIENT_ID:}"
client-secret: "${OAUTH_TWITTER_CLIENT_SECRET:}"
weibo:
name: "${OAUTH_WEIBO_NAME:Weibo}"
icon: "${OAUTH_WEIBO_ICON:weibo}"
color: "${OAUTH_WEIBO_COLOR:#e92b00}"
client-id: "${OAUTH_WEIBO_CLIENT_ID:}"
client-secret: "${OAUTH_WEIBO_CLIENT_SECRET:}"
yahoo:
name: "${OAUTH_YAHOO_NAME:Yahoo}"
icon: "${OAUTH_YAHOO_ICON:yahoo}"
color: "${OAUTH_YAHOO_COLOR:#720e9e}"
client-id: "${OAUTH_YAHOO_CLIENT_ID:}"
client-secret: "${OAUTH_YAHOO_CLIENT_SECRET:}"
# external configuration:
external:
remote-code-runner:
enabled: ${REMOTE_CODE_RUNNER_ENABLED:false}
url: ${REMOTE_CODE_RUNNER_URL:http://localhost:8080/run}
languages: ${REMOTE_CODE_RUNNER_LANGUAGES:java,python}
wait: ${REMOTE_CODE_RUNNER_WAIT:15}
timeout: ${REMOTE_CODE_RUNNER_TIMEOUT:10}
max-concurrent: ${REMOTE_CODE_RUNNER_MAX_CONCURRENT:10}
# END