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

Appearance settings

Commit 91b3e48

Browse filesBrowse files
committed
Fix DB_PORT
This fixes the DB_PORT if it’s not set it will be the default mysql port. Otherwise you can override it with DB_PORT as environment variable.
1 parent aebcb4f commit 91b3e48
Copy full SHA for 91b3e48

File tree

Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-3
lines changed

‎docker-entrypoint.sh

Copy file name to clipboardExpand all lines: docker-entrypoint.sh
+4-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.