Unverified Commit a8bef505 authored by Sheogorath's avatar Sheogorath Committed by GitHub

Merge pull request #45 from dargmuesli/docker-secret_db-url

Entrypoint: Respect Docker Secret DB URL File
parents 19b8a226 b3652259
......@@ -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