Skip to content

Commit

Permalink
fix(docker): remove configuration overridden by env (apache#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
chunshao90 authored Aug 31, 2022
1 parent 4c6fc3a commit 3ee4d3f
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,9 @@ DATA_DIR="/home/${USER}/data"
DATA_PATH="${DATA_DIR}/ceresdb"
CONFIG_FILE="/etc/ceresdb/ceresdb.toml"

# use echo to trim spaces
LOCAL_IP=$(echo -n $(hostname -I))

# enable jemalloc heap profiling
export MALLOC_CONF="prof:true,prof_active:false,lg_prof_sample:19"

if [ "${CERESDB_HTTP_PORT}" == "" ]; then
CERESDB_HTTP_PORT="5440"
fi
if [ "${CERESDB_GRPC_PORT}" == "" ]; then
CERESDB_GRPC_PORT="8831"
fi
if [ "${CERESDB_ENABLE_DATANODE}" != "true" ]; then
CERESDB_ENABLE_DATANODE="false"
fi

## config file
# Do not use `/` for sed, because there are `/` in path args
sed -i 's|${HTTP_PORT}|'${CERESDB_HTTP_PORT}'|g' ${CONFIG_FILE}
sed -i 's|${GRPC_PORT}|'${CERESDB_GRPC_PORT}'|g' ${CONFIG_FILE}
sed -i 's|${DATA_PATH}|'${DATA_PATH}'|g' ${CONFIG_FILE}
sed -i 's|${NODE_ADDR}|'${LOCAL_IP}'|g' ${CONFIG_FILE}

## data dir
mkdir -p ${DATA_DIR}
chmod +777 -R ${DATA_DIR}
Expand Down

0 comments on commit 3ee4d3f

Please sign in to comment.