Skip to content

Commit

Permalink
Fix deployment issues
Browse files Browse the repository at this point in the history
  • Loading branch information
timonegk committed Jan 22, 2024
1 parent 226e64e commit c25dafc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ 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
```
It is important to change at least the database settings, secret key, and allowed hosts.

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
The container is reachable on port 3009.
If you use an external web server, you can use uwsgi traffic on port 3008 and serve the static
assets from `run/static` at `/static/`.

# Manual Install

Expand Down
4 changes: 4 additions & 0 deletions bitpoll/settings_local.sample.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# customize to your needs
import re
import os
# You must insert your own random value here
# SECURITY WARNING: keep the secret key used in production secret!
# see <https://docs.djangoproject.com/en/dev/howto/deployment/checklist/#secret-key>
Expand All @@ -11,6 +12,9 @@
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False

# The domain name of the site
ALLOWED_HOSTS = ['bitpoll.example.com']

## If Bitpoll is served via HTTPS enable the next two options
#SESSION_COOKIE_SECURE = True
#CSRF_COOKIE_SECURE = True
Expand Down
5 changes: 4 additions & 1 deletion docker_files/uwsgi-bitpoll.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
procname-master = uwsgi %n
master = true
socket = :3008
http = :3009
http-socket = :3009

plugins = python3

Expand All @@ -26,3 +26,6 @@ cheaper = 2

; disable uWSGI request logging
disable-logging = true

; serve static files
static-map = /static=/opt/static

0 comments on commit c25dafc

Please sign in to comment.