diff --git a/README.md b/README.md index e6c1c70..965c3a6 100644 --- a/README.md +++ b/README.md @@ -3,20 +3,30 @@ Bitpoll is a software to conduct polls about Dates, Times or general Questions. -This is a new version of the Dudel from opatut () used on , rewritten using the Django framework as a backend. +This is a new version of the Dudel from opatut () used on , rewritten using the Django framework as a backend. # Using Docker -~~~ -docker build --tag -cd +The docker image is built automatically from the current master branch. +You can use the following commands to set up the docker container: + +Create a directory for static and config files: +``` mkdir -p run/{log,static,config} -cp /bitpoll/settings_local.py run/config/settings.py -vim run/config/settings.py -docker run -a stdout -a stderr --rm --name bitpoll -p 3008:3008 -p 3009:3009 --volume `pwd`/run/static:/opt/static --volume `pwd`/run/config:/opt/config --volume `pwd`/run/log/:/opt/log -~~~ -The Static assets from /run/static have to be served from the Webserver at /static/. -The Container listens for uwsgi traffic on Port 3008 and for HTTP traffic on Port 8009 +``` + +Get the example settings file and adapt it according to your needs: +``` +wget https://raw.githubusercontent.com/fsinfuhh/Bitpoll/master/bitpoll/settings_local.sample.py -O run/config/settings.py +``` + +Start the docker container: +``` +docker run -a stdout -a stderr --rm --name bitpoll -p 3008:3008 -p 3009:3009 --volume ./run/static:/opt/static --volume ./run/config:/opt/config ghcr.io/fsinfuhh/bitpoll +``` + +The Static assets from `run/static` have to be served from the Webserver at `/static/`. +The Container listens for uwsgi traffic on Port 3008 and for HTTP traffic on Port 8009. TODO: add example nginx Config