From 8f131263af49609c010b492600e12288ec403c18 Mon Sep 17 00:00:00 2001 From: Bae KwonHan Date: Sun, 13 Aug 2023 12:38:51 +0900 Subject: [PATCH 1/2] update README to c&p easily --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 38164f5..536c96f 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ A git repository for PyCon Korea api. 설치하거나 도커를 활용하여 postgresql을 설치합니다. ```sh -$ docker run -d --name postgres -p 5432:5432 postgres +docker run -d --name postgres -p 5432:5432 postgres ``` @@ -22,11 +22,11 @@ $ docker run -d --name postgres -p 5432:5432 postgres ```bash -$ git clone git@github.com:pythonkr/pyconkr-api.git -$ cd pyconkr-api +git clone git@github.com:pythonkr/pyconkr-api.git +cd pyconkr-api -$ ./manage.py migrate -$ ./manage.py runserver +./manage.py migrate +./manage.py runserver ``` From a6b0f74689c6afc93b6dede29a398bb51a968d7d Mon Sep 17 00:00:00 2001 From: Bae KwonHan Date: Sat, 29 Jun 2024 19:00:29 +0900 Subject: [PATCH 2/2] update to fix number of worker --- Dockerfile | 4 ++-- docker-entrypoint.sh | 4 ++-- requirements.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 391142e..ba45792 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.6.8-stretch +FROM --platform=linux/amd64 python:3.6.15-bullseye ENV PYTHONUNBUFFERED 1 WORKDIR /config @@ -8,4 +8,4 @@ ADD requirements.txt /config/ RUN pip install -r requirements.txt WORKDIR /web -ENTRYPOINT ["/web/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["/web/docker-entrypoint.sh"] diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index e1891b4..c740b7f 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -45,8 +45,8 @@ tail -n 0 -f /logs/*.log & echo "==== Starting server =====" gunicorn pyconkr.wsgi:application \ --bind=0.0.0.0:8000 \ - --workers 13 \ - --threads 256 \ + --workers 4 \ + --threads 8 \ --worker-connections=5000 \ --max-requests 10000 \ --max-requests-jitter 5 \ diff --git a/requirements.txt b/requirements.txt index 65fe26e..c72d348 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ botocore==1.12.159 certifi==2018.11.29 cffi==1.11.5 chardet==3.0.4 -codecov==2.0.15 +codecov coreapi==2.3.3 coreschema==0.0.4 coverage==4.5.2