Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
solo-1
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
solo-1
Commits
782248a1
Unverified
Commit
782248a1
authored
Nov 11, 2019
by
Liang Ding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🎨
#12943
parent
36492fbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
4 deletions
+32
-4
src/main/java/org/b3log/solo/Server.java
src/main/java/org/b3log/solo/Server.java
+28
-0
src/main/resources/docker/local.properties
src/main/resources/docker/local.properties
+4
-4
No files found.
src/main/java/org/b3log/solo/Server.java
View file @
782248a1
...
...
@@ -180,6 +180,34 @@ public final class Server extends BaseServer {
Markdowns
.
LUTE_AVAILABLE
=
true
;
}
if
(
Latkes
.
isDocker
())
{
// Docker 环境需要填充默认值
final
String
jdbcMinConns
=
System
.
getenv
(
"JDBC_MIN_CONNS"
);
if
(
StringUtils
.
isBlank
(
jdbcMinConns
))
{
Latkes
.
setLocalProperty
(
"jdbc.minConnCnt"
,
"5"
);
LOGGER
.
log
(
Level
.
INFO
,
"Default JDBC min conns"
);
}
else
{
LOGGER
.
log
(
Level
.
INFO
,
"env [JDBC_MIN_CONNS="
+
jdbcMinConns
+
"]"
);
}
final
String
jdbcMaxConns
=
System
.
getenv
(
"JDBC_MAX_CONNS"
);
if
(
StringUtils
.
isBlank
(
jdbcMaxConns
))
{
Latkes
.
setLocalProperty
(
"jdbc.maxConnCnt"
,
"10"
);
LOGGER
.
log
(
Level
.
INFO
,
"Default JDBC max conns"
);
}
else
{
LOGGER
.
log
(
Level
.
INFO
,
"env [JDBC_MAX_CONNS="
+
jdbcMaxConns
+
"]"
);
}
final
String
jdbcTablePrefix
=
System
.
getenv
(
"JDBC_TABLE_PREFIX"
);
if
(
StringUtils
.
isBlank
(
jdbcTablePrefix
))
{
Latkes
.
setLocalProperty
(
"jdbc.tablePrefix"
,
"b3_solo"
);
LOGGER
.
log
(
Level
.
INFO
,
"Default JDBC table prefix "
);
}
else
{
LOGGER
.
log
(
Level
.
INFO
,
"env [JDBC_TABLE_PREFIX="
+
jdbcTablePrefix
+
"]"
);
}
}
Dispatcher
.
startRequestHandler
=
new
BeforeRequestHandler
();
Dispatcher
.
HANDLERS
.
add
(
1
,
new
SkinHandler
());
Dispatcher
.
HANDLERS
.
add
(
2
,
new
InitCheckHandler
());
...
...
src/main/resources/docker/local.properties
View file @
782248a1
...
...
@@ -18,7 +18,7 @@
#
# Description: Solo local environment configurations for docker.
# Version: 2.0.0.
0, Mar 19
, 2019
# Version: 2.0.0.
1, Nov 11
, 2019
# Author: Liang Ding
#
...
...
@@ -29,8 +29,8 @@ jdbc.driver=${JDBC_DRIVER}
jdbc.URL
=
${JDBC_URL}
# The minConnCnt MUST larger or equal to 3
jdbc.minConnCnt
=
5
jdbc.maxConnCnt
=
10
jdbc.minConnCnt
=
${JDBC_MIN_CONNS}
jdbc.maxConnCnt
=
${JDBC_MAX_CONNS}
# The specific table name prefix
jdbc.tablePrefix
=
b3_solo
jdbc.tablePrefix
=
${JDBC_TABLE_PREFIX}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment