Skip to content

Commit 5581587

Browse files
committed
🐳 docker-compose finished
1 parent 308802f commit 5581587

File tree

4 files changed

+280
-13
lines changed

4 files changed

+280
-13
lines changed

Dockerfile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
FROM python:3.7-stretch
22
RUN pip install pipenv
3-
COPY Pipfile* /tmp
4-
RUN cd /tmp && pipenv lock --requirements > requirements.txt
5-
RUN pip install -r /tmp/requirements.txt
6-
COPY . /tmp/myapp
7-
RUN pip install /tmp/myapp
8-
CMD ["uvicorn", "fastapi_scaffolding.main:app", "host='0.0.0.0'", "port=3000"]
3+
COPY . ./app
4+
WORKDIR /app
5+
RUN pipenv install
6+
EXPOSE 3000
7+
CMD ["pipenv", "run", "uvicorn", "fastapi_scaffolding.main:app", "--host=0.0.0.0", "--port=3000", "--workers=10"]

Pipfile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,21 @@ verify_ssl = true
66
[dev-packages]
77

88
[packages]
9+
uvicorn = "==0.11.5"
10+
fastapi = "==0.58.0"
11+
scikit-learn = "==0.23.1"
12+
joblib = "==0.15.1"
13+
loguru = "*"
14+
click = "==7.1.2"
15+
h11 = "==0.9.0"
16+
httptools = "==0.1.1"
17+
numpy = "==1.19.0"
18+
pydantic = "==1.5.1"
19+
scipy = "==1.5.0"
20+
starlette = "==0.13.4"
21+
threadpoolctl = "==2.1.0"
22+
uvloop = "==0.14.0"
23+
websockets = "==8.1"
924

1025
[requires]
1126
python_version = "3.7"

Pipfile.lock

Lines changed: 245 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

requirements.txt

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
1-
requests==2.22.0
2-
uvicorn==0.11.2
3-
fastapi==0.48.0
4-
numpy==1.18.1
5-
scikit-learn==0.22.1
6-
joblib==0.14.1
7-
loguru==0.4.1
1+
-i https://pypi.org/simple
2+
click==7.1.2; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'
3+
fastapi==0.58.0
4+
h11==0.9.0
5+
httptools==0.1.1; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy'
6+
joblib==0.15.1
7+
numpy==1.19.0; python_version >= '3.6'
8+
pydantic==1.5.1; python_version >= '3.6'
9+
scikit-learn==0.23.1
10+
scipy==1.5.0; python_version >= '3.6'
11+
starlette==0.13.4; python_version >= '3.6'
12+
threadpoolctl==2.1.0; python_version >= '3.5'
13+
uvicorn==0.11.5
14+
uvloop==0.14.0; sys_platform != 'win32' and sys_platform != 'cygwin' and platform_python_implementation != 'PyPy'
15+
websockets==8.1; python_full_version >= '3.6.1'

0 commit comments

Comments
 (0)