Commit ca022efd authored by Ulf Seltmann's avatar Ulf Seltmann
Browse files

added configurable DocumentRoot

parent 4a97ac11
......@@ -2,11 +2,11 @@ FROM debian:stretch-slim
#ENTRYPOINT [ "/docker-entrypoint" ]
CMD ["apache2", "-D", "FOREGROUND"]
ENV BASE_PATH="" \
SHIB_HANDLER_URL=/Shibboleth.sso \
ENV SHIB_HANDLER_URL=/Shibboleth.sso \
APACHE_RUN_DIR=/var/run/apache2 \
APACHE_RUN_USER=www-data \
APACHE_RUN_GROUP=www-data
APACHE_RUN_GROUP=www-data \
APACHE_DOC_ROOT=/var/www/html
#ADD assets/docker-entrypoint /docker-entrypoint
ADD assets/*.conf /etc/apache2/conf-available/
......@@ -20,8 +20,10 @@ RUN apt-get update \
&& apt-get autoremove -y --purge \
&& sed -e 's!^\(ErrorLog\).*$!\1 /proc/self/fd/2!' -i /etc/apache2/apache2.conf \
&& sed -e 's!^\(PidFile.*\)$!#\1!' -i /etc/apache2/apache2.conf \
&& sed -e 's!/var/www/html!${APACHE_DOC_ROOT}!g' -i /etc/apache2/sites-available/000-default.conf \
&& sed -e 's!^\(\s*ErrorLog\).*$!\1 /proc/self/fd/2!' -i /etc/apache2/sites-available/000-default.conf \
&& sed -e 's!^\(\s*CustomLog\).*$!\1 /proc/self/fd/1 combined!' -i /etc/apache2/sites-available/000-default.conf \
&& sed -e 's!/var/www/html!${APACHE_DOC_ROOT}!g' -i /etc/apache2/sites-available/default-ssl.conf \
&& sed -e 's!^\(\s*ErrorLog\).*$!\1 /proc/self/fd/2!' -i /etc/apache2/sites-available/default-ssl.conf \
&& sed -e 's!^\(\s*CustomLog\).*$!\1 /proc/self/fd/1 combined!' -i /etc/apache2/sites-available/default-ssl.conf \
&& a2disconf serve-cgi-bin other-vhosts-access-log \
......
# Changelog
## 2.4-1 - 2018-07-02
### Added
* *DocumentRoot* configurable via `APACHE_DOC_ROOT` environment variable
## 2.4-0 - 2018-07-02
* initial release
......@@ -69,6 +69,14 @@ $# docker run --name httpd \
apache2 -D FOREGROUND -D shibboleth
```
## Advanced configuration
* `SHIB_HANDLER_URL=/Shibboleth.sso`: where apache's sibboleth-handler listens. only with `-D shibboleth`.
* `APACHE_RUN_DIR=/var/run/apache2`: the working directory of the httpd-daemon. almost always unnecessary to change. know, what you do.
* `APACHE_RUN_USER=www-data`: the user the httpd-daemon runs with. almost always unnecessary to change. know, what you do.
* `APACHE_RUN_GROUP=www-data`: the group the httpd-daemon runs with. almost always unnecessary to change. know, what you do.
* `APACHE_DOC_ROOT=/var/www/html`: the document root of the content to deliver.
[VuFind]: https://github.com/vufind-org/vufind
[ubleipzig/shibboleth]: https://hub.docker.com/r/ubleipzig/vufind-shibboleth/
[ubleipzig/vufind-php]: https://hub.docker.com/r/ubleipzig/vufind-php/
......
......@@ -68,6 +68,14 @@ $# docker run --name httpd \
apache2 -D FOREGROUND -D shibboleth
```
## Advanced configuration
* `SHIB_HANDLER_URL=/Shibboleth.sso`: Wo Apache's Shibboleth-Handler Anfragen erwartet. Nur sinnvoll in Verbindung mit `-D shibboleth`.
* `APACHE_RUN_DIR=/var/run/apache2`: Das Arbeitsverzeichnis des httpd-Daemons. So gut wie nie notwendig, anzupassen. Wisse, was du tust.
* `APACHE_RUN_USER=www-data`: Der Benutzer mit dem der httpd-Daemon startet. So gut wie nie notwendig, anzupassen. Wisse, was du tust.
* `APACHE_RUN_GROUP=www-data`: Die Gruppe mit dem der httpd-Daemon startet. So gut wie nie notwendig, anzupassen. Wisse, was du tust.
* `APACHE_DOC_ROOT=/var/www/html`: Das Document-Root aus dem der Inhalt ausgeliefert wird.
[VuFind]: https://github.com/vufind-org/vufind
[ubleipzig/shibboleth]: https://hub.docker.com/r/ubleipzig/vufind-shibboleth/
[ubleipzig/vufind-php]: https://hub.docker.com/r/ubleipzig/vufind-php/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment