Skip to content

Commit

Permalink
build: add dockerfile and gunicorn
Browse files Browse the repository at this point in the history
  • Loading branch information
ttpss930141011 committed Sep 26, 2023
1 parent 1bd93fd commit 410cdda
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM python:3.10-slim

COPY requirements.txt /requirements.txt
RUN pip install -r requirements.txt

WORKDIR /app
COPY . /app
EXPOSE 5000
CMD exec gunicorn --bind :$PORT --workers 1 --worker-class uvicorn.workers.UvicornWorker --threads 8 main:app
22 changes: 21 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ psycopg2 = "^2.9.7"
openai = "^0.28.0"
tiktoken = "^0.5.1"
google-search-results = "^2.4.2"
gunicorn = "^21.2.0"

[tool.poetry.group.dev.dependencies]
pytest = "^7.4.2"
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ psycopg2==2.9.7
openai==0.27.8
tiktoken==0.4.0
google-search-results==2.4.2
flake8==6.1.0
flake8==6.1.0
gunicorn==21.2.0

0 comments on commit 410cdda

Please sign in to comment.