Commit 1408eb8b authored by Lukas Burgey's avatar Lukas Burgey

Update example settings and install script

parent 408913b5
......@@ -139,7 +139,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
TIME_ZONE = 'Europe/Berlin'
USE_I18N = True
......@@ -157,6 +157,9 @@ LOGGING = {
'standard': {
'format': '%(asctime)s - %(name)s - %(levelname)s - %(message)s',
},
'compact': {
'format': '%(levelname)s - %(message)s',
},
},
'handlers': {
'django': {
......@@ -170,6 +173,12 @@ LOGGING = {
'filename': LOGGING_ROOT + '/debug.log',
'formatter': 'standard',
},
'compact-debug': {
'level': 'DEBUG',
'class': 'logging.FileHandler',
'filename': LOGGING_ROOT + '/compact-debug.log',
'formatter': 'compact',
},
'info': {
'level': 'INFO',
'class': 'logging.FileHandler',
......@@ -189,11 +198,11 @@ LOGGING = {
},
'loggers': {
'feudal': {
'handlers': ['debug', 'info', 'error'],
'handlers': ['debug', 'info', 'error', 'compact-debug'],
'level': 'DEBUG',
},
'django': {
'handlers': ['debug', 'info', 'error'],
'handlers': ['debug', 'info', 'error', 'compact-debug'],
'level': 'INFO',
},
},
......
......@@ -16,9 +16,11 @@ master = true
# maximum number of worker processes
processes = 1
# the socket (use the full path to be safe
socket = /home/feudal/feudalBackend/feudal.sock
socket = /home/feudal/.feudal.sock
# ... with appropriate permissions - may be needed
chmod-socket = 666
# clear environment on exit
vacuum = true
logto = /home/feudal/logs/uwsgi.log
......@@ -2,6 +2,7 @@
config_dir=${config_dir-~/config}
logs_dir=${logs_dir-~/logs}
secret_key=${secret_key-./.secret.key}
echo "Using config dir: $config_dir"
echo "Using logs dir: $logs_dir"
......@@ -15,14 +16,15 @@ ln -s $config_dir/django_settings.py ./feudal/settings.py
echo
echo "Generating secret at ./.secret.key"
dd if=/dev/urandom bs=64 count=1 | base64 > ./.secret.key
[[ ! -f $secret_key ]] && \
dd if=/dev/urandom bs=64 count=1 | base64 > $secret_key
echo
virtualenv -p /usr/bin/python3 ./env
source env/bin/activate
# TODO check dependencies
pip install Django django-cors-headers django-mysql djangorestframework oic urllib3 mysqlclient pika
pip install Django django-cors-headers djangorestframework django-mysql mysqlclient oic urllib3 pika
echo "Starting database migration (is your database configured?)"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment