Entrypoint: Respect Docker Secret DB URL File

Sequelize fails otherwise.
parent 19b8a226
......@@ -12,6 +12,12 @@ if [ "$HMD_IMAGE_UPLOAD_TYPE" != "" ] && [ "$CMD_IMAGE_UPLOAD_TYPE" = "" ]; then
CMD_IMAGE_UPLOAD_TYPE="$HMD_IMAGE_UPLOAD_TYPE"
fi
DOCKER_SECRET_DB_URL_FILE_PATH="/run/secrets/dbURL"
if [ -f "$DOCKER_SECRET_DB_URL_FILE_PATH" ]; then
CMD_DB_URL="$(cat $DOCKER_SECRET_DB_URL_FILE_PATH)"
fi
if [ "$CMD_DB_URL" = "" ]; then
CMD_DB_URL="postgres://hackmd:hackmdpass@hackmdPostgres:5432/hackmd"
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment