We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents aebcb4f + 91b3e48 commit 309d91fCopy full SHA for 309d91f
docker-entrypoint.sh
@@ -1,10 +1,12 @@
1
#!/bin/bash
2
set -e
3
4
+DB_PORT=${DB_PORT:-3306}
5
+
6
echoerr() { echo "$@" 1>&2; }
7
8
if [ ! -f '/var/www/BookStack/.env' ]; then
- if [ "$DB_HOST" ]; then
9
+ if [[ "${DB_HOST}" ]]; then
10
cat > /var/www/BookStack/.env <<EOF
11
# Environment
12
APP_ENV=production
@@ -77,8 +79,7 @@ if [ ! -f '/var/www/BookStack/.env' ]; then
77
79
# URL used for social login redirects, NO TRAILING SLASH
78
80
EOF
81
else
- echo >&2 'warning: missing MYSQL_PORT_3306_TCP environment variables'
- echo >&2 ' Did you forget to --link some_mysql_container:mysql ?'
82
+ echo >&2 'error: missing DB_PORT or DB_HOST environment variables'
83
exit 1
84
fi
85
0 commit comments