From e70916427f411ddf4efe78d15b1b61152119642b Mon Sep 17 00:00:00 2001 From: Pablo Silva Date: Thu, 12 Aug 2021 17:06:59 -0300 Subject: [PATCH] Fix gunicorn execution --- run.sh | 2 +- src/ARte/config/urls.py | 3 ++- tasks.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index fa9a4457..3a953847 100755 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/bash pip list -inv i18n --compile docs run -p +inv i18n --compile docs run -p -g diff --git a/src/ARte/config/urls.py b/src/ARte/config/urls.py index 1d15a6dc..537d4e3c 100644 --- a/src/ARte/config/urls.py +++ b/src/ARte/config/urls.py @@ -3,9 +3,10 @@ from django.contrib import admin from django.urls import path, include import debug_toolbar +import os urlpatterns = [ - path('admin/', admin.site.urls), + path(os.getenv('DJANGO_ADMIN_URL', 'admin/'), admin.site.urls), path('', include('core.urls')), path('', include('core.routes')), path('users/', include('users.urls')), diff --git a/tasks.py b/tasks.py index f7559913..0879f47f 100644 --- a/tasks.py +++ b/tasks.py @@ -38,7 +38,7 @@ def run(ctx, ssl=False, gunicorn=False, postgres=False, whitenoise=False): Run development server """ if gunicorn: - ctx.run('cd src/ARte && gunicorn --worker-class=gevent --worker-connections=10000 --workers=4 --log-level debug --bind 0.0.0.0:8000 config.wsgi', env={"DEV_DB":"False"}) + ctx.run('cd src/ARte && gunicorn --worker-connections=10000 --workers=4 --log-level debug --bind 0.0.0.0:8000 config.wsgi', env={"DEV_DB":"False"}) else: manage(ctx, "runserver 0.0.0.0:8000", postgres, whitenoise)