Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Containerize the project; use uvicorn to invoke
Containerizing got around a pandas compilation issue I was having
locally. Using uvicorn got the server running, whereas running it via
"python wsgi.py" just exited with a status of zero.
  • Loading branch information
wainstead committed May 30, 2021
commit 73612701ce9281659d43ef647847ce31af03fc34
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.9.5-alpine3.13
WORKDIR /code
ENV FASTAPI_APP=app.py
ENV FASTAPI_RUN_HOST=0.0.0.0
RUN apk add --no-cache gcc musl-dev linux-headers make
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
EXPOSE 5000
COPY . .
CMD ["python", "wsgi.py"]
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: "3.9"
services:
web:
build: .
ports:
- "5000:5000"
20 changes: 20 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,22 @@
aiofiles==0.7.0
aniso8601==7.0.0
appdirs==1.4.4
astroid==2.4.2
async-exit-stack==1.0.1
async-generator==1.10
attrs==19.3.0
black==19.10b0
certifi==2020.6.20
chardet==3.0.4
click==7.1.2
dnspython==2.1.0
email-validator==1.1.2
fastapi==0.58.1
Flask==1.1.2
Flask-SQLAlchemy==2.5.1
graphene==2.1.8
graphql-core==2.3.2
graphql-relay==2.0.1
h11==0.9.0
httptools==0.1.1
idna==2.10
Expand All @@ -21,24 +31,34 @@ mccabe==0.6.1
more-itertools==8.4.0
mypy==0.782
mypy-extensions==0.4.3
numpy==1.20.3
orjson==3.5.2
packaging==20.4
pandas==1.2.4
pathspec==0.8.0
pluggy==0.13.1
promise==2.3
py==1.9.0
pydantic==1.5.1
pyhumps==1.3.1
pylint==2.5.3
pyparsing==2.4.7
pytest==5.4.3
pytest-asyncio==0.14.0
python-dateutil==2.8.1
python-multipart==0.0.5
pytz==2021.1
PyYAML==5.4.1
regex==2020.6.8
requests==2.24.0
Rx==1.6.1
six==1.15.0
SQLAlchemy==1.3.18
starlette==0.13.4
toml==0.10.1
typed-ast==1.4.1
typing-extensions==3.7.4.2
ujson==4.0.2
urllib3==1.25.9
uvicorn==0.11.5
uvloop==0.14.0
Expand Down