mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-21 11:06:09 +02:00
Replace port using sed and document environment-variable
Signed-off-by: Sascha <sascha@retter.jetzt> Signed-off-by: Sascha Retter <sascha.retter@mailbox.org>
This commit is contained in:
parent
05026b029d
commit
6db6dc3fd6
2 changed files with 8 additions and 0 deletions
|
@ -209,6 +209,9 @@ Check the [Nexcloud documentation](https://docs.nextcloud.com/server/latest/admi
|
||||||
|
|
||||||
Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.
|
Keep in mind that once set, removing these environment variables won't remove these values from the configuration file, due to how Nextcloud merges configuration files together.
|
||||||
|
|
||||||
|
## Changing port of Apache
|
||||||
|
If you want to run Apache on another port e.g. an unprivileged port which might make sense e.g. inside Kubernetes you can set the environment variable `APACHE_PORT`.
|
||||||
|
|
||||||
# Running this image with docker-compose
|
# Running this image with docker-compose
|
||||||
The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.
|
The easiest way to get a fully featured and functional setup is using a `docker-compose` file. There are too many different possibilities to setup your system, so here are only some examples of what you have to look for.
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
|
||||||
} > /usr/local/etc/php/conf.d/redis-session.ini
|
} > /usr/local/etc/php/conf.d/redis-session.ini
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -n "${APACHE_PORT+x}" ]; then
|
||||||
|
sed -i "s/VirtualHost \*:80/VirtualHost \*:${APACHE_PORT}/" /etc/apache2/sites-enabled/000-default.conf
|
||||||
|
sed -i "s/Listen 80/Listen ${APACHE_PORT}/" /etc/apache2/ports.conf
|
||||||
|
fi
|
||||||
|
|
||||||
installed_version="0.0.0.0"
|
installed_version="0.0.0.0"
|
||||||
if [ -f /var/www/html/version.php ]; then
|
if [ -f /var/www/html/version.php ]; then
|
||||||
# shellcheck disable=SC2016
|
# shellcheck disable=SC2016
|
||||||
|
|
Loading…
Add table
Reference in a new issue