hotpocket/services/backend/hotpocket_backend/settings/aio.py

32 lines
689 B
Python

# -*- coding: utf-8 -*-
# type: ignore
from __future__ import annotations
import os
from .webapp import * # noqa: F403
DEBUG = (
os.environ.get('HOTPOCKET_BACKEND_DEBUG', 'false').lower() == 'true'
)
ALLOWED_HOSTS = os.environ.get('HOTPOCKET_BACKEND_ALLOWED_HOSTS', '*').split(',')
MIDDLEWARE = [
*MIDDLEWARE, # noqa: F405
'whitenoise.middleware.WhiteNoiseMiddleware',
]
STORAGES['staticfiles'] = { # noqa: F405
'BACKEND': 'whitenoise.storage.CompressedManifestStaticFilesStorage',
}
ROOT_URLCONF = 'hotpocket_backend.urls.aio'
UPLOADS_PATH = Path( # noqa: F405
os.environ.get(
'HOTPOCKET_BACKEND_UPLOADS_PATH',
'/srv/run/uploads',
),
)