mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
Customize Apache listen port (#59)
* Overwrite apache listen port in Apache configuration if configured via environment variable LISTEN_PORT * Add documenation to README * Add default value to ENV vars documentation Co-authored-by: Michael Prankl <michael.prankl@muenchen.de>
This commit is contained in:
@@ -23,6 +23,8 @@ URL_FORMAT=${URL_FORMAT:-'path'}
|
||||
DEBUG=${DEBUG:-0}
|
||||
DEBUG_SQL=${DEBUG_SQL:-0}
|
||||
|
||||
LISTEN_PORT=${LISTEN_PORT:-"80"}
|
||||
|
||||
if [ -z "$DB_PASSWORD" ]; then
|
||||
echo >&2 'Error: Missing DB_PASSWORD'
|
||||
exit 1
|
||||
@@ -33,6 +35,11 @@ if [ -z "$ADMIN_PASSWORD" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$LISTEN_PORT" != "80" ]; then
|
||||
echo "Info: Customizing Apache Listen port to $LISTEN_PORT"
|
||||
sed -i "s/80/$LISTEN_PORT/" /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf
|
||||
fi
|
||||
|
||||
# Check if database is available
|
||||
if [ -z "$DB_SOCK" ]; then
|
||||
until nc -z -v -w30 $DB_HOST $DB_PORT
|
||||
|
||||
Reference in New Issue
Block a user