diff --git a/strapi/docker-entrypoint.sh b/strapi/docker-entrypoint.sh index 73dfccf..3e59791 100755 --- a/strapi/docker-entrypoint.sh +++ b/strapi/docker-entrypoint.sh @@ -1,6 +1,13 @@ #!/bin/sh set -ea +# Allow sensitive settings to be defined in a file +# in order to support Docker secrets +if [ -n "${DATABASE_PASSWORD_FILE}" ]; then + DATABASE_PASSWORD=$(cat "$DATABASE_PASSWORD_FILE") + export DATABASE_PASSWORD +fi + if [ "$1" = "strapi" ]; then if [ ! -f "package.json" ]; then