Add a mailman user and setup loggers.

This commit is contained in:
Abhilash Raj
2017-05-28 17:11:41 -07:00
parent 0ae0a55a42
commit 2025f733a9
2 changed files with 20 additions and 4 deletions

View File

@@ -89,4 +89,10 @@ python manage.py collectstatic --noinput
# this command will upgrade the database.
python manage.py migrate
# Create a mailman user with the specific UID and GID and do not create home
# directory for it. Also chown the logs directory to write the files.
useradd -M -U -u 1000 mailman
chown mailman:mailman /opt/mailman-web-data -R
exec $@

View File

@@ -17,10 +17,6 @@ threads = 2
uid = 1000
gid = 1000
# Setup the log files.
req-log = file:/opt/mailman-web-data/uwsgi.log
error-log = file:/opt/mailman-web-data/uwsgi-error.log
# Setup the django_q related worker processes.
attach-daemon = ./manage.py qcluster
@@ -30,3 +26,17 @@ cron2 = hour=1,unique=1 ./manage.py runjobs hourly
cron2 = day=1,unique=1 ./manage.py runjobs monthly
cron2 = week=1,unique=1 ./manage.py runjobs weekly
cron2 = month=1,unique=1 ./manage.py runjobs yearly
# Setup the request log.
req-logger = file:/opt/mailman-web-data/logs/uwsgi.log
# Log cron seperately.
logger = cron file:/opt/mailman-web-data/logs/uwsgi-cron.log
log-route = cron uwsgi-cron
# Log qcluster commands seperately.
logger = qcluster file:/opt/mailman-web-data/logs/uwsgi-qcluster.log
log-route = qcluster uwsgi-daemons
# Last log and it logs the rest of the stuff.
logger = file:/opt/mailman-web-data/logs/uwsgi-error.log