From cffd69e2e515f537ed9d7be47f0b8592b9832c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EB=B0=8D?= <79096808+0321minji@users.noreply.github.com> Date: Sat, 13 Jul 2024 16:40:29 +0900 Subject: [PATCH] #59 fix : add some buffer size to conf file (#76) * #59 fix : add some buffer size to conf file * #59 fix : modify settings module route from utils.py&services.py --- .config/nginx/UPCY.conf | 20 +++++++++++++++++--- UpcyProject/settings/settings.py | 6 ++++-- core/utils.py | 2 +- services/services.py | 2 +- 4 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.config/nginx/UPCY.conf b/.config/nginx/UPCY.conf index 03fc928..09757bc 100644 --- a/.config/nginx/UPCY.conf +++ b/.config/nginx/UPCY.conf @@ -5,7 +5,21 @@ server { client_max_body_size 128M; location / { - uwsgi_pass unix:///tmp/UPCY.sock; - include uwsgi_params; + include uwsgi_params; + uwsgi_pass unix:///tmp/UPCY.sock; + uwsgi_read_timeout 300s; + uwsgi_send_timeout 300s; + uwsgi_buffer_size 32k; + uwsgi_buffers 8 32k; + uwsgi_busy_buffers_size 64k; + uwsgi_temp_file_write_size 64k; } -} \ No newline at end of file + + location /static/ { + alias /home/ubuntu/UPCY_BE/static/; + } + + location /media/ { + alias /home/ubuntu/UPCY_BE/media/; + } +} diff --git a/UpcyProject/settings/settings.py b/UpcyProject/settings/settings.py index 39f3d29..928381d 100644 --- a/UpcyProject/settings/settings.py +++ b/UpcyProject/settings/settings.py @@ -123,9 +123,11 @@ # https://docs.djangoproject.com/en/4.0/ref/settings/#databases DATABASES = { - 'default': env.db(), + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': BASE_DIR / 'db.sqlite3', + } } - # Password validation # https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators diff --git a/core/utils.py b/core/utils.py index 6bdbe94..ff75beb 100644 --- a/core/utils.py +++ b/core/utils.py @@ -7,7 +7,7 @@ import boto3 import uuid from django.conf import settings -from UpcyProject import settings +from UpcyProject.settings import settings from datetime import datetime diff --git a/services/services.py b/services/services.py index 6becd4c..60c81aa 100644 --- a/services/services.py +++ b/services/services.py @@ -11,7 +11,7 @@ from .selectors import ServiceSelector from users.models import User from core.utils import s3_file_upload_by_file_data -from UpcyProject import settings +from UpcyProject.settings import settings class ServiceCoordinatorService: