Use UWSGI_LOGTO environment var to set logging path
This commit is contained in:
committed by
Abhilash Raj
parent
f88e8fc87c
commit
5503fbf79d
@@ -35,4 +35,4 @@ EXPOSE 8000
|
||||
|
||||
ENTRYPOINT ["/opt/run.sh"]
|
||||
|
||||
CMD ["uwsgi", "--http-auto-chunked --http-keepalive --logto $UWSGI_LOG_URL"]
|
||||
CMD ["uwsgi", "--http-auto-chunked","--http-keepalive"]
|
||||
|
||||
@@ -88,15 +88,14 @@ python manage.py collectstatic --noinput
|
||||
# this command will upgrade the database.
|
||||
python manage.py migrate
|
||||
|
||||
# Check if there is a non-standard location for logging defined.
|
||||
# It can be changed by $UWSGI_LOG_URL environment variable, which if not set points
|
||||
# to /opt/mailman-web/logs/uwsgi.log
|
||||
# It can also point to a logging daemon accessible at a URL.
|
||||
if [[ ! -v UWSGI_LOG_URL ]]; then
|
||||
echo "No UWSGI_LOG_URL defined, logging uwsgi to /opt/mailman-web-data/logs/uwsgi.log ..."
|
||||
export UWSGI_LOG_URL='/opt/mailman-web-data/logs/uwsgi.log'
|
||||
if [[ ! -e "$UWSGI_LOG_URL" ]]; then
|
||||
touch "$UWSGI_LOG_URL"
|
||||
|
||||
# Log to the default location /opt/mailman-web-data/logs/uwsgi.log if the
|
||||
# logging variable is not set.
|
||||
if [[ ! -v UWSGI_LOGTO ]]; then
|
||||
echo "No UWSGI_LOGTO defined, logging uwsgi to /opt/mailman-web-data/logs/uwsgi.log ..."
|
||||
export UWSGI_LOGTO='/opt/mailman-web-data/logs/uwsgi.log'
|
||||
if [[ ! -e "$UWSGI_LOGTO" ]]; then
|
||||
touch "$UWSGI_LOGTO"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user