jgoerzen/moin
Moin as an apache2 reverse proxy client under Debian
287
This image is a moinmoin wiki in a Debian container.
Start with FROM jgoerzen/moin
.
If using behind a reverse proxy, set the environment variable
PROXYCLIENT_AUTHORIZED
to the IP or IP+netmask of the authorized
proxies. This step is not necessary if you are listening directly.
Drop files in /etc/apache2/sites-avaialable, looking something like this:
<VirtualHost *:80>
ServerName www.example.com
Include sites-available/moin-common-sites
</VirtualHost>
Don't forget to a2ensite
each one in your donfig.
Set up the config files in /etc/moin, especially farmconfig, as
documented in /usr/share/doc/python-moinmoin
.
Your moin installation directories, wherever you put them, should be
owned by the user www-data
. The moin url_prefix_static
should be
/moin_static
in the default configuration.
Finally, make sure to end your Dockerfile with CMD ["/usr/local/bin/boot-debian-base"]
.
I recommend you to run your containers with:
docker run -td --stop-signal=SIGRTMIN+3 \
--tmpfs /run:size=100M --tmpfs /run/lock:size=100M \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
--name=name -t -d --net=whatever
I recommend that you add VOLUME ["/var/log/apache2"]
to your
Dockerfile. When rebuilding and restarting your containers, use a
sequence such as:
docker stop web
docker rename web web.old
docker run <<parameters>> --volumes-from=web.old --name-web ....
docker rm web.old
This will let your logs persist, and will avoid unnecessary calls to letsencrypt to obtain new certs. The latter is important to avoid false expiration emails and hitting their rate limiting.
Of course, you will also want your moin directory, wherever you put it, to be persistent. Most would probably mount it as a volume from the host machine.
Docker scripts, etc. are Copyright (c) 2018-2019 John Goerzen All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Additional software copyrights as noted.
docker pull jgoerzen/moin