From 2a4a9a52c746282dc2ed28cd79fd50098b09536e Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sun, 2 Mar 2025 16:28:59 +0330 Subject: [PATCH 01/16] update gunicorn --- backend/core/wsgi.py | 2 +- backend/dockerfile | 5 ++++- backend/requirements.txt | 2 ++ docker-compose.yml | 2 +- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend/core/wsgi.py b/backend/core/wsgi.py index 94b58d7..63445b4 100644 --- a/backend/core/wsgi.py +++ b/backend/core/wsgi.py @@ -11,6 +11,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'core.settings.production') application = get_wsgi_application() diff --git a/backend/dockerfile b/backend/dockerfile index 9e24e11..b86405d 100644 --- a/backend/dockerfile +++ b/backend/dockerfile @@ -11,4 +11,7 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . /app/ -CMD ["sh", "-c", "python manage.py makemigrations && python manage.py migrate && python manage.py collectstatic && python manage.py runserver 0.0.0.0:8000"] \ No newline at end of file +CMD ["sh", "-c", "python manage.py makemigrations && \ + python manage.py migrate && \ + python manage.py collectstatic --no-input && \ + gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 3"] \ No newline at end of file diff --git a/backend/requirements.txt b/backend/requirements.txt index 83cdbca..29093dc 100644 --- a/backend/requirements.txt +++ b/backend/requirements.txt @@ -48,6 +48,7 @@ geoip2==4.8.0 ghasedak_sms==1.0.3 ghasedakpack==0.1.13 gnupg==2.3.1 +gunicorn==23.0.0 h11==0.14.0 http_ece==1.2.1 httpagentparser==1.9.5 @@ -73,6 +74,7 @@ oauthlib==3.2.2 odfpy==1.4.1 openai==1.58.1 openpyxl==3.1.2 +packaging==24.2 pillow==10.4.0 platformdirs==4.2.2 propcache==0.2.0 diff --git a/docker-compose.yml b/docker-compose.yml index eded502..5972767 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: [ "sh", "-c", - "python manage.py migrate && python manage.py collectstatic --no-input && python manage.py runserver 0.0.0.0:8000", + "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 10", ] networks: - default From 59603284c69751b1945df1603f1175ea35ca8bda Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sun, 2 Mar 2025 16:39:55 +0330 Subject: [PATCH 02/16] test gunicorn --- backend/.env.local | 2 -- backend/dockerfile | 2 +- docker-compose.yml | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/backend/.env.local b/backend/.env.local index e0f9789..9f27c2c 100644 --- a/backend/.env.local +++ b/backend/.env.local @@ -1,6 +1,4 @@ ### keep the env name to .env.local if you want to change this .env name you should change it in django setting too when you load this env - -DEBUG = True # keep debug true to set the database to sqlite # postgres database info DB_NAME = 'hshop' DB_USER = 'byeto' diff --git a/backend/dockerfile b/backend/dockerfile index b86405d..a02ce9e 100644 --- a/backend/dockerfile +++ b/backend/dockerfile @@ -14,4 +14,4 @@ COPY . /app/ CMD ["sh", "-c", "python manage.py makemigrations && \ python manage.py migrate && \ python manage.py collectstatic --no-input && \ - gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 3"] \ No newline at end of file + gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 5"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 5972767..86939c2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: [ "sh", "-c", - "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 10", + "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 5", ] networks: - default From e0e5f1c429b8cb27aeda74c29be185e19042b089 Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sun, 2 Mar 2025 16:47:34 +0330 Subject: [PATCH 03/16] debug gunicorn path --- backend/dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/dockerfile b/backend/dockerfile index a02ce9e..2d78688 100644 --- a/backend/dockerfile +++ b/backend/dockerfile @@ -14,4 +14,4 @@ COPY . /app/ CMD ["sh", "-c", "python manage.py makemigrations && \ python manage.py migrate && \ python manage.py collectstatic --no-input && \ - gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 5"] \ No newline at end of file + gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 5"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 86939c2..c023ea0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: [ "sh", "-c", - "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn backend.wsgi:application --bind 0.0.0.0:8000 --workers 5", + "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 5", ] networks: - default From ff4d26cdc69f80191a013ff2d86536e3f02b7fbd Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Sun, 2 Mar 2025 17:24:56 +0330 Subject: [PATCH 04/16] lower workers --- backend/dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/dockerfile b/backend/dockerfile index 2d78688..a52545a 100644 --- a/backend/dockerfile +++ b/backend/dockerfile @@ -14,4 +14,4 @@ COPY . /app/ CMD ["sh", "-c", "python manage.py makemigrations && \ python manage.py migrate && \ python manage.py collectstatic --no-input && \ - gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 5"] \ No newline at end of file + gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index c023ea0..66ea3cc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,7 +24,7 @@ services: [ "sh", "-c", - "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 5", + "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn core.wsgi:application --bind 0.0.0.0:8000 --workers 3", ] networks: - default From 70c15121f32e78e842a0435ac737eb891269a5fc Mon Sep 17 00:00:00 2001 From: Parsa Nazer Date: Mon, 3 Mar 2025 14:02:01 +0330 Subject: [PATCH 05/16] test ci cd --- frontend/dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/dockerfile b/frontend/dockerfile index 52d9096..42999c9 100644 --- a/frontend/dockerfile +++ b/frontend/dockerfile @@ -10,4 +10,4 @@ WORKDIR /app COPY --from=build-stage /app /app EXPOSE 3000 ENV NODE_ENV=production -CMD ["npm", "run", "start"] \ No newline at end of file +CMD ["npm", "run", "start"] From 8d33aeea4b3324e90b01ea5887fda9e1eaa00ec2 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Tue, 4 Mar 2025 20:40:37 +0330 Subject: [PATCH 06/16] Updated --- frontend/assets/css/tailwind.css | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/frontend/assets/css/tailwind.css b/frontend/assets/css/tailwind.css index daa5770..b615e31 100644 --- a/frontend/assets/css/tailwind.css +++ b/frontend/assets/css/tailwind.css @@ -119,6 +119,11 @@ --breakpoint-3xl: 1700px; --breakpoint-2xs: 400px; --breakpoint-xs: 480px; + --breakpoint-sm: 640px; + --breakpoint-md: 768px; + --breakpoint-lg: 1024px; + --breakpoint-xl: 1280px; + --breakpoint-2xl: 1536px; /* ANIMATIONS */ --animate-marquee: marquee 20s linear infinite; @@ -261,7 +266,29 @@ @utility container { @apply mx-auto; - padding-inline: 3rem; + padding-inline: 1.5rem; + max-width: 1380px; + + @screen 2xs { + padding-inline: 1rem; + } + + @screen xs { + padding-inline: 1rem; + } + + @screen sm { + padding-inline: 1rem; + } + + @screen md { + padding-inline: 2rem; + } + + @screen lg { + padding-inline: 3rem; + } + @screen xl { padding-inline: 5rem; } From 5aff85c6a8107496e9dba6a6f8f5ab793ae37253 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Tue, 4 Mar 2025 20:40:42 +0330 Subject: [PATCH 07/16] Updated --- frontend/components/articles/ArticlesList.vue | 37 +------------------ 1 file changed, 2 insertions(+), 35 deletions(-) diff --git a/frontend/components/articles/ArticlesList.vue b/frontend/components/articles/ArticlesList.vue index 4413d94..3231515 100644 --- a/frontend/components/articles/ArticlesList.vue +++ b/frontend/components/articles/ArticlesList.vue @@ -1,9 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file From 47a3e109804bc31168d7f1adc9201d0772a4aaa8 Mon Sep 17 00:00:00 2001 From: marzban-dev Date: Tue, 4 Mar 2025 20:40:48 +0330 Subject: [PATCH 08/16] Updated --- .../components/global/product/ProductCard.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/frontend/components/global/product/ProductCard.vue b/frontend/components/global/product/ProductCard.vue index 85252ef..13fde84 100644 --- a/frontend/components/global/product/ProductCard.vue +++ b/frontend/components/global/product/ProductCard.vue @@ -1,4 +1,5 @@