Add a mailman user and setup loggers.
This commit is contained in:
@@ -89,4 +89,10 @@ python manage.py collectstatic --noinput
|
|||||||
# this command will upgrade the database.
|
# this command will upgrade the database.
|
||||||
python manage.py migrate
|
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 $@
|
exec $@
|
||||||
|
|||||||
@@ -17,10 +17,6 @@ threads = 2
|
|||||||
uid = 1000
|
uid = 1000
|
||||||
gid = 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.
|
# Setup the django_q related worker processes.
|
||||||
attach-daemon = ./manage.py qcluster
|
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 = day=1,unique=1 ./manage.py runjobs monthly
|
||||||
cron2 = week=1,unique=1 ./manage.py runjobs weekly
|
cron2 = week=1,unique=1 ./manage.py runjobs weekly
|
||||||
cron2 = month=1,unique=1 ./manage.py runjobs yearly
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user