Skip to content

Commit

Permalink
Update docker instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Jan 15, 2024
1 parent 8b6a9e6 commit 1b1c4f1
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 (<https://github.com/opatut/dudel>) used on <mafiasi.de>, rewritten using the Django framework as a backend.
This is a new version of the Dudel from opatut (<https://github.com/opatut/dudel>) used on <https://bitpoll.de>, rewritten using the Django framework as a backend.

# Using Docker

~~~
docker build --tag <imagename>
cd <workdir>
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 <original_dir>/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 <image_name>
~~~
The Static assets from <workdir>/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

Expand Down

0 comments on commit 1b1c4f1

Please sign in to comment.