Revert "Enable running wsgi in production mode" (#22614)

This reverts commit 469f85f6924f0c94b8e0b4af369416149beb65de.
This commit is contained in:
Kevin Meinhardt 2024-08-30 13:12:12 +02:00 коммит произвёл GitHub
Родитель e3b8da1533
Коммит ad91f29730
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
2 изменённых файлов: 15 добавлений и 7 удалений

Просмотреть файл

@ -25,5 +25,15 @@ max-requests = 5000
# Load apps in workers and not only in master
lazy-apps = true
# Open log file after we dropped privileges so that the file is being owned
# by uid:gid and has proper permissions to be readable outside of docker
logto2 = %(base)/logs/uwsgi-olympia.log
# Limit log file size to 10MB
log-maxsize = 1048576
# And set the name for the previous log
log-backupname = %(base)/logs/uwsgi-olympia.log.1
# Set default settings as originally done by manage.py
env = DJANGO_SETTINGS_MODULE=settings

Просмотреть файл

@ -16,12 +16,13 @@ WSGI_APPLICATION = 'olympia.wsgi.application'
INTERNAL_ROUTES_ALLOWED = True
DEBUG = os.environ.get('DEBUG', True)
DEBUG = True
# These apps are great during development.
INSTALLED_APPS += ('olympia.landfill',)
INSTALLED_APPS += ('debug_toolbar',) if DEBUG else ()
INSTALLED_APPS += (
'olympia.landfill',
'debug_toolbar',
)
# Override logging config to enable DEBUG logs for (almost) everything.
LOGGING['root']['level'] = logging.DEBUG
@ -35,9 +36,6 @@ for logger in list(LOGGING['loggers'].keys()):
# django-debug-doolbar middleware needs to be inserted as high as possible
# but after GZip middleware
def insert_debug_toolbar_middleware(middlewares):
if not DEBUG:
return middlewares
ret_middleware = list(middlewares)
for i, middleware in enumerate(ret_middleware):