INIT
This commit is contained in:
99
README.rst
Normal file
99
README.rst
Normal file
@@ -0,0 +1,99 @@
|
||||
ABOUT
|
||||
=====
|
||||
Docker container for django-dav-events.
|
||||
|
||||
|
||||
AUTHOR
|
||||
======
|
||||
Jens Kleineheismann <heinzel@alpenverein-karlsruhe.de>
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
===========
|
||||
This docker image is derivated from the official Fedora image
|
||||
(https://hub.docker.com/_/fedora).
|
||||
|
||||
It will contain and run
|
||||
|
||||
- apache httpd
|
||||
- mod_ssl
|
||||
- certbot
|
||||
- python3 mod_wsgi
|
||||
- django-dav-events django project
|
||||
|
||||
|
||||
BUILD
|
||||
=====
|
||||
- ``make``
|
||||
- ``make test``
|
||||
|
||||
or alternatively the *long* way:
|
||||
|
||||
- ``git clone https://dev.heinzelwerk.de/git/DAV-KA/django-dav-events src/django-dav-events``
|
||||
- ``docker build -t django-dav-events .``
|
||||
- ``dgoss run django-dav-events``
|
||||
|
||||
|
||||
USAGE
|
||||
=====
|
||||
- ``docker run -ti --rm -v $(pwd)/conf:/srv/etc:Z -e DJANGO_SYNCDB=true django-dav-events django-createsuperuser``
|
||||
- ``docker run -ti --rm -v $(pwd)/conf:/srv/etc:Z -v $(pwd)/conf/letsencrypt:/etc/letsencrypt:Z -p 80:80 django-dav-events certbot``
|
||||
- ``docker run -d --name django-dav-events -v $(pwd)/conf:/srv/etc:Z -p 80:80 -p 443:443 django-dav-events``
|
||||
|
||||
Django settings
|
||||
---------------
|
||||
The django project will read its settings from ``/srv/etc/django/settings.py``
|
||||
Note: this file will be read only upon container startup.
|
||||
|
||||
If this settings file does not exist, the default settings will be installed
|
||||
there.
|
||||
|
||||
To provide your own settings file, you can mount a directory into the
|
||||
container with the -v option of the ``docker run`` command.
|
||||
|
||||
SELinux
|
||||
-------
|
||||
If your system is enforcing SELinux policies you have to set the correct
|
||||
file contexts to mounted files and directories.
|
||||
On recent docker versions, this can be done with the Z parameter of the
|
||||
-v option (-v host_path:container_path:Z).
|
||||
|
||||
HTTP Port
|
||||
---------
|
||||
The httpd process is listening on port 80/tcp.
|
||||
Thus you probably want to publish this port with the -p option.
|
||||
|
||||
HTTPS Port / TLS / X.509 Certificates / certbot
|
||||
-----------------------------------------------
|
||||
To enable HTTPS on port 443/tcp you can either provide a key and
|
||||
certificate chain as pem files, or you can use certbot to obtain a
|
||||
*Let's Encrypt* certificate.
|
||||
|
||||
If you already have valid certificates for the domain, you can mount
|
||||
the key as ``/srv/etc/certs/privkey.pem`` and the certificate
|
||||
chain as ``/srv/etc/certs/fullchain.pem``.
|
||||
|
||||
For using certbot you have to mount a directory to ``/etc/letsencrypt``.
|
||||
Then run the container once in interactive mode with the ``certbot`` command
|
||||
argument to obtain a certificate from *Let's Encrypt*. The certificate will
|
||||
be stored in the mounted directory.
|
||||
If necessary the certificate will be renewed upon container startup.
|
||||
|
||||
Environment variables
|
||||
---------------------
|
||||
The following **environment variables** are supported and
|
||||
can be set with the -e option of the ``docker run`` command:
|
||||
|
||||
- LOG_LEVEL (default: error)
|
||||
-- to set the httpd LogLevel directive
|
||||
- ENABLE_STATUS_ENDPOINTS (default: false)
|
||||
-- if true, then the httpd status-handler is mapped to /.status
|
||||
and the httpd info-handler is mapped to /.info
|
||||
- DJANGO_SYNCDB (default: false)
|
||||
-- if true, then apply django database migrations upon startup
|
||||
|
||||
|
||||
LICENCE
|
||||
=======
|
||||
Permission to use, copy, modify, and/or distribute this software
|
||||
for any purpose with or without fee is hereby granted.
|
||||
Reference in New Issue
Block a user