From a3883ac51229a3239afba59ac1261325788d495a Mon Sep 17 00:00:00 2001 From: Michiel Scholten Date: Mon, 18 Jul 2016 13:32:36 +0200 Subject: [PATCH] Example configuration --- README.md | 5 +++++ example_config/apache_vhost.conf | 29 +++++++++++++++++++++++++++++ example_config/settings.py | 14 ++++++++++++++ example_config/uwsgi.ini | 15 +++++++++++++++ settings_example.py | 0 5 files changed, 63 insertions(+) create mode 100644 example_config/apache_vhost.conf create mode 100644 example_config/settings.py create mode 100644 example_config/uwsgi.ini delete mode 100644 settings_example.py diff --git a/README.md b/README.md index f8ebdc4..0cc5dc9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ # digimarks Simple bookmarking service + + +## Installing + +Copy `example_config/settings.py` to your install location and change to your needs (*at the least* change the value of `SYSTEMKEY`). diff --git a/example_config/apache_vhost.conf b/example_config/apache_vhost.conf new file mode 100644 index 0000000..fd0a500 --- /dev/null +++ b/example_config/apache_vhost.conf @@ -0,0 +1,29 @@ + + ServerAdmin webmaster@example.com + ServerName marks.example.com + + WSGIDaemonProcess digimarks user=youruser group=youruser threads=5 python-path=/srv/marks.example.com/digimarks/ + WSGIScriptAlias / /srv/marks.example.com/digimarks/wsgi.py + + + WSGIProcessGroup digimarks + WSGIApplicationGroup %{GLOBAL} + Require all granted + + + + + Require all granted + + + + ErrorLog /var/log/apache2/error_marks.example.com.log + + # Possible values include: debug, info, notice, warn, error, crit, + # alert, emerg. + LogLevel warn + + CustomLog /var/log/apache2/access_marks.example.com.log combined + ServerSignature On + + diff --git a/example_config/settings.py b/example_config/settings.py new file mode 100644 index 0000000..1bb81d5 --- /dev/null +++ b/example_config/settings.py @@ -0,0 +1,14 @@ +# Virtualenv to use with the wsgi file +VENV = '/srv/marks.example.com/venv/bin/activate_this.py' + +PORT = 8086 + +DEBUG = False + +# Password/url key to do admin stuff with, like adding a user +SYSTEMKEY = 'S3kr1t' + +LOG_LOCATION = 'digimarks.log' +#LOG_LOCATION = '/var/log/digimarks/digimarks.log' +# How many logs to keep in log rotation: +LOG_BACKUP_COUNT = 10 diff --git a/example_config/uwsgi.ini b/example_config/uwsgi.ini new file mode 100644 index 0000000..0bb0bb7 --- /dev/null +++ b/example_config/uwsgi.ini @@ -0,0 +1,15 @@ +# Example supervisord configuration +# Run with /srv/venv/bin/uwsgi --ini /srv/digimarks/uwsgi.ini:digimarks + +[digimarks] +chdir = /srv/digimarks +socket = /tmp/uwsgi_digimarks.sock +module = wsgi +threads = 4 +master = true +processes = 5 +vacuum = true +no-orphans = true +chmod-socket = 666 +logger = main file:/var/log/webapps/digimarks.log +logger = file:/var/log/webapps/digimarks_debug.log diff --git a/settings_example.py b/settings_example.py deleted file mode 100644 index e69de29..0000000