Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dc-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
bltdc
dc-common
Commits
1356138a
Commit
1356138a
authored
Mar 15, 2019
by
wutong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Zookeeper CD/CI
parent
2e187033
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
docker-entrypoint.sh
data-zookeeper/docker-entrypoint.sh
+38
-0
No files found.
data-zookeeper/docker-entrypoint.sh
0 → 100644
View file @
1356138a
#!/bin/bash
set
-e
# Allow the container to be started with `--user`
if
[[
"
$1
"
=
'zkServer.sh'
&&
"
$(
id
-u
)
"
=
'0'
]]
;
then
chown
-R
"
$ZOO_USER
"
"
$ZOO_DATA_DIR
"
"
$ZOO_DATA_LOG_DIR
"
"
$ZOO_LOG_DIR
"
"
$ZOO_CONF_DIR
"
exec
su-exec
"
$ZOO_USER
"
"
$0
"
"
$@
"
fi
# Generate the config only if it doesn't exist
if
[[
!
-f
"
$ZOO_CONF_DIR
/zoo.cfg"
]]
;
then
CONFIG
=
"
$ZOO_CONF_DIR
/zoo.cfg"
echo
"clientPort=
$ZOO_PORT
"
>>
"
$CONFIG
"
echo
"dataDir=
$ZOO_DATA_DIR
"
>>
"
$CONFIG
"
echo
"dataLogDir=
$ZOO_DATA_LOG_DIR
"
>>
"
$CONFIG
"
echo
"tickTime=
$ZOO_TICK_TIME
"
>>
"
$CONFIG
"
echo
"initLimit=
$ZOO_INIT_LIMIT
"
>>
"
$CONFIG
"
echo
"syncLimit=
$ZOO_SYNC_LIMIT
"
>>
"
$CONFIG
"
echo
"autopurge.snapRetainCount=
$ZOO_AUTOPURGE_SNAPRETAINCOUNT
"
>>
"
$CONFIG
"
echo
"autopurge.purgeInterval=
$ZOO_AUTOPURGE_PURGEINTERVAL
"
>>
"
$CONFIG
"
echo
"maxClientCnxns=
$ZOO_MAX_CLIENT_CNXNS
"
>>
"
$CONFIG
"
for
server
in
$ZOO_SERVERS
;
do
echo
"
$server
"
>>
"
$CONFIG
"
done
fi
# Write myid only if it doesn't exist
if
[[
!
-f
"
$ZOO_DATA_DIR
/myid"
]]
;
then
echo
"
${
ZOO_MY_ID
:-
1
}
"
>
"
$ZOO_DATA_DIR
/myid"
fi
exec
"
$@
"
\ No newline at end of file
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