Skip to content

Commit 202b47c

Browse files
authored
Merge pull request #281 from gitnnolabs/change_pserver_gunicorn
Change WSGI server de pserver para gunicorn
2 parents ce4b917 + 5e4bcdf commit 202b47c

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ COPY production.ini /app/config.ini
1414
COPY requirements.txt .
1515

1616
RUN apk add --no-cache --virtual .build-deps \
17-
make gcc libxml2-dev libxslt-dev musl-dev g++ git \
17+
make gcc libxml2-dev libxslt-dev musl-dev g++ git libffi-dev \
1818
&& apk add libxml2 libxslt \
1919
&& pip install --no-cache-dir --upgrade pip \
2020
&& pip install --no-cache-dir -r requirements.txt \
@@ -28,4 +28,5 @@ WORKDIR /app
2828
ENV PYTHONUNBUFFERED 1
2929

3030
USER nobody
31-
CMD ["pserve", "/app/config.ini"]
31+
# CMD ["pserve", "/app/config.ini"]
32+
CMD ["gunicorn", "documentstore.wsgi:application", "--bind", "0.0.0.0:6543", "--workers=3", "--worker-class=gevent", "--timeout=1000", "--worker-connections=1000", "--log-level DEBUG"]

documentstore/wsgi.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from documentstore.restfulapi import main
2+
3+
application = main({})

requirements.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ hupper==1.10.2
77
idna==2.9
88
iso8601==0.1.12
99
lxml==4.5.0
10-
numpy==1.18.4
1110
PasteDeploy==2.1.0
1211
plaster==1.0
1312
plaster-pastedeploy==0.7
@@ -32,3 +31,8 @@ WebOb==1.8.6
3231
zope.deprecation==4.4.0
3332
zope.interface==5.1.0
3433
-e git+https://github.com/scieloorg/clea@v0.4.5#egg=scielo-clea
34+
gunicorn==23.0.0
35+
# numpy==1.21.6
36+
gevent==21.12.0
37+
Cython==0.29.21
38+

0 commit comments

Comments
 (0)