1 Star 0 Fork 3

tonychen0716/人大金仓-kingbase-es-v8-r6-docker

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-entrypoint.sh 1.21 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
DB_PATH=/home/kingbase
DATA_DIR=/home/kingbase/data
LOG_FILE=${DB_PATH}/logfile
PWD_FILE=${DB_PATH}/password
check_is_init() {
declare -g DATABASE_ALREADY_EXISTS
if [ -d "${DATA_DIR}" -a `ls -A ${DATA_DIR}|wc -w` -ne 0 ];then
DATABASE_ALREADY_EXISTS='true'
fi
}
db_init(){
mkdir -p ${DATA_DIR}
chown -R kingbase:kingbase ${DATA_DIR}
echo ${SYSTEM_PWD-123456} > ${PWD_FILE}
cd ${DB_PATH}/Server/bin/
initdb --help
if [ "${CASE_SENSITIVE}" = "YES" ] || [ "${CASE_SENSITIVE}" = "1" ];then
caseSensitiveMode=""
elif [ "${CASE_SENSITIVE}" = "NO" ] || [ "${CASE_SENSITIVE}" = "0" ];then
caseSensitiveMode="--enable-ci"
else
echo "case sensitive param wrong"
exit 2
fi
./initdb -U${SYSTEM_USER-system} --pwfile=${PWD_FILE} --encoding=${ENCODING-UTF8} ${DATA_DIR} -m${DATABASE_MODE-ORACLE} --block-size=${BLOCK_SIZE-8} ${caseSensitiveMode}
}
check_is_init
if [ -z "${DATABASE_ALREADY_EXISTS}" ];then
db_init
if [ $? -ne 0 ];then
echo "initdb failed"
exit 1
fi
fi
if [ -f "${DB_PATH}/Server/bin/license.dat" ];then
cp ${DB_PATH}/Server/bin/license.dat ${DB_PATH}/
fi
${DB_PATH}/Server/bin/sys_ctl -D ${DATA_DIR} -l ${LOG_FILE} start
sleep 15
exec tail -f ${LOG_FILE}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
其他
1
https://gitee.com/tonychen0716/kingbase-es-v8-r6-docker.git
git@gitee.com:tonychen0716/kingbase-es-v8-r6-docker.git
tonychen0716
kingbase-es-v8-r6-docker
人大金仓-kingbase-es-v8-r6-docker
master

搜索帮助