Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 309d91f

Browse files
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

‎docker-entrypoint.sh‎

Lines changed: 4 additions & 3 deletions
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)

AltStyle によって変換されたページ (->オリジナル) /