Skip to content

Commit 309d91f

Browse files
authored
Merge pull request #8 from solidnerd/fix_db_port
Fix DB_PORT
2 parents aebcb4f + 91b3e48 commit 309d91f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Diff for: docker-entrypoint.sh

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
#!/bin/bash
22
set -e
33

4+
DB_PORT=${DB_PORT:-3306}
5+
46
echoerr() { echo "$@" 1>&2; }
57

68
if [ ! -f '/var/www/BookStack/.env' ]; then
7-
if [ "$DB_HOST" ]; then
9+
if [[ "${DB_HOST}" ]]; then
810
cat > /var/www/BookStack/.env <<EOF
911
# Environment
1012
APP_ENV=production
@@ -77,8 +79,7 @@ if [ ! -f '/var/www/BookStack/.env' ]; then
7779
# URL used for social login redirects, NO TRAILING SLASH
7880
EOF
7981
else
80-
echo >&2 'warning: missing MYSQL_PORT_3306_TCP environment variables'
81-
echo >&2 ' Did you forget to --link some_mysql_container:mysql ?'
82+
echo >&2 'error: missing DB_PORT or DB_HOST environment variables'
8283
exit 1
8384
fi
8485
fi

0 commit comments

Comments
 (0)