mirror of
https://github.com/avatao-content/baseimage-tutorial-framework
synced 2024-11-22 12:51:32 +00:00
Implement loglevel configuration from Dockerfile
This commit is contained in:
parent
071167d3d7
commit
0e38bef92e
@ -62,6 +62,8 @@ ENV TFW_SUPERVISORD_CONF="/etc/supervisor/supervisord.conf"
|
||||
|
||||
ENV PYTHONPATH=${TFW_LIB_DIR}
|
||||
|
||||
ENV TFW_LOGLEVEL="debug"
|
||||
|
||||
COPY src/nginx /etc/nginx
|
||||
RUN chown -R ${AVATAO_USER}: /var/log/nginx /var/lib/nginx && \
|
||||
# nginx runs as a regular user, and can't write to /run
|
||||
|
@ -12,3 +12,4 @@ SUPERVISOR_HTTP_URI = 'http://localhost:{}'.format(SUPERVISOR_HTTP_PORT)
|
||||
|
||||
LOGIN_APP_DIR = os.getenv('TFW_LOGIN_APP_DIR')
|
||||
TERMINADO_DIR = os.getenv('TFW_TERMINADO_DIR')
|
||||
LOGLEVEL = os.getenv('TFW_LOGLEVEL').upper()
|
||||
|
@ -1,5 +1,6 @@
|
||||
import logging
|
||||
|
||||
logging.getLogger().setLevel(logging.DEBUG)
|
||||
from config import LOGLEVEL
|
||||
|
||||
# TODO: configure supervisord loglevel from here
|
||||
|
||||
logging.getLogger().setLevel(LOGLEVEL)
|
||||
|
@ -1,7 +1,7 @@
|
||||
[supervisord]
|
||||
user=user
|
||||
logfile = /tmp/supervisord.log
|
||||
loglevel = DEBUG
|
||||
loglevel = %(ENV_TFW_LOGLEVEL)s
|
||||
pidfile = /tmp/supervisord.pid
|
||||
|
||||
[unix_http_server]
|
||||
|
Loading…
Reference in New Issue
Block a user