diff --git a/Dockerfile b/Dockerfile index d9c8ff3a0..cf69f1bf6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -87,6 +87,7 @@ ENV TILEGENERATION_CONFIGFILE=/etc/tilegeneration/config.yaml \ TILECLOUD_LOG_LEVEL=INFO \ C2CWSGIUTILS_LOG_LEVEL=WARN \ WAITRESS_LOG_LEVEL=INFO \ + WSGI_LOG_LEVEL=INFO \ SQL_LOG_LEVEL=WARN \ OTHER_LOG_LEVEL=WARN \ VISIBLE_ENTRY_POINT=/ \ @@ -97,7 +98,9 @@ ENV TILEGENERATION_CONFIGFILE=/etc/tilegeneration/config.yaml \ TILE_CHUNK_SIZE=1 \ TILE_SERVER_LOGLEVEL=quiet \ TILE_MAPCACHE_LOGLEVEL=verbose \ - WAITRESS_THREADS=10 + WAITRESS_THREADS=10 \ + PYRAMID_INCLUDES= \ + DEBUGTOOLBAR_HOSTS= EXPOSE 8080 diff --git a/application.ini b/application.ini index 97ebb066b..4f8b38cc5 100644 --- a/application.ini +++ b/application.ini @@ -18,6 +18,13 @@ c2c.base_path = /c2c tilegeneration_configfile = %(TILEGENERATION_CONFIGFILE)s +pyramid.includes = %(PYRAMID_INCLUDES)s +# Be careful when manipulate this, +# if a hacker has access to the debug toolbar, +# it's a severe security issue +# With the provided values, the debug toolbar is only available from the Docker network +debugtoolbar.hosts = %(DEBUGTOOLBAR_HOSTS)s + [filter:translogger] use = egg:Paste#translogger setup_console_handler = False @@ -27,7 +34,7 @@ use = egg:PasteDeploy#prefix prefix = %(VISIBLE_ENTRY_POINT)s [pipeline:main] -pipeline = egg:c2cwsgiutils#client_info egg:c2cwsgiutils#sentry app +pipeline = translogger egg:c2cwsgiutils#client_info egg:c2cwsgiutils#sentry app [server:main] use = egg:waitress#main @@ -42,7 +49,7 @@ clear_untrusted_proxy_headers = False ### [loggers] -keys = root, waitress, c2cwsgiutils, tilecloud, tilecloud_chain, sqlalchemy +keys = root, waitress, wsgi, c2cwsgiutils, tilecloud, tilecloud_chain, sqlalchemy [handlers] keys = console, json @@ -78,6 +85,11 @@ qualname = sqlalchemy.engine # "level = DEBUG" logs SQL queries and results. # "level = WARN" logs neither. (Recommended for production systems.) +[logger_wsgi] +level = %(WSGI_LOG_LEVEL)s +handlers = +qualname = wsgi + [logger_waitress] level = %(WAITRESS_LOG_LEVEL)s handlers =