mirror of
https://github.com/jgeusebroek/docker-spotweb.git
synced 2025-06-03 06:07:23 +02:00
Made webserver port configurable via environment variable
This commit is contained in:
parent
28dc1ce916
commit
17b0930309
@ -62,6 +62,12 @@ unset rt
|
||||
/usr/sbin/a2enmod expires && rt=1
|
||||
/usr/sbin/a2enmod deflate && rt=1
|
||||
|
||||
# Change Apache port if needed from the default 80 to `WEBSERVER_PORT` (to run unprivileged or with a host network where no port mapping is available)
|
||||
if [[ -n "$WEBSERVER_PORT" ]]; then
|
||||
sed -i "s/Listen 80/Listen \$WEBSERVER_PORT/" /etc/apache2/ports.conf
|
||||
sed -i "s/VirtualHost *:80/VirtualHost *:\$WEBSERVER_PORT/" /etc/apache2/sites-enabled/000-default.conf
|
||||
fi
|
||||
|
||||
# Only restart if one of the enmod commands succeeded
|
||||
if [[ -n $rt ]]; then
|
||||
/etc/init.d/apache2 restart
|
||||
|
Loading…
x
Reference in New Issue
Block a user