Skip to content

Commit

Permalink
add unicorn service using gunicorn.
Browse files Browse the repository at this point in the history
  • Loading branch information
bluebamus committed Jul 13, 2024
1 parent c030ab1 commit 264a796
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1,795 deletions.
5 changes: 4 additions & 1 deletion config/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

from django.core.asgi import get_asgi_application

os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings')
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.dev")
# os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.test")
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.stage')
# os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'config.settings.prod')

application = get_asgi_application()
1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
]

WSGI_APPLICATION = "config.wsgi.application"
# ASGI_APPLICATION = "config.asgi.application"

# Password validation
# https://docs.djangoproject.com/en/3.2/ref/settings/#auth-password-validators
Expand Down
6 changes: 3 additions & 3 deletions config/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@


INSTALLED_APPS += [
"django_prometheus",
# "django_prometheus",
"django_celery_beat",
"django_celery_results",
"captcha",
Expand All @@ -102,8 +102,8 @@
"""
MIDDLEWARE += []

MIDDLEWARE.insert(0, "django_prometheus.middleware.PrometheusBeforeMiddleware")
MIDDLEWARE.insert(-1, "django_prometheus.middleware.PrometheusAfterMiddleware")
# MIDDLEWARE.insert(0, "django_prometheus.middleware.PrometheusBeforeMiddleware")
# MIDDLEWARE.insert(-1, "django_prometheus.middleware.PrometheusAfterMiddleware")

CACHES = {
"default": {
Expand Down
Loading

0 comments on commit 264a796

Please sign in to comment.