Add ability to change Apache port for network_mode: host (#291)

This commit is contained in:
Matthew Thompson 2020-04-02 02:57:32 +10:00 committed by GitHub
parent 91796c8cc6
commit 99edf0f5f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -34,6 +34,7 @@ ENV PASSWORD=password
ENV TELEMETRY=false
ENV ENABLE_ID_OBFUSCATION=false
ENV REDACT_IP_ADDRESSES=false
ENV WEBPORT=80
# Final touches

View file

@ -24,7 +24,6 @@ if [ "$MODE" == "backend" ]; then
fi
fi
# Set up index.php for frontend-only or standalone modes
if [ "$MODE" == "frontend" ]; then
cp /speedtest/frontend.php /var/www/html/index.php
@ -52,6 +51,11 @@ if [[ "$TELEMETRY" == "true" && ( "$MODE" == "frontend" || "$MODE" == "standalon
chown www-data /database/
fi
# Allow selection of Apache port for network_mode: host
if [ "$WEBPORT" != "80" ]; then
sed -i "s/80/$WEBPORT/g" /etc/apache2/sites-available/000-default.conf /etc/apache2/ports.conf
fi
echo "Done, Starting APACHE"