Skip to content

Commit fe35abb

Browse files
committed
Update
1 parent fede3c6 commit fe35abb

File tree

4 files changed

+1342
-0
lines changed

4 files changed

+1342
-0
lines changed

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
FROM python:3.12-alpine as generate-requirements
2+
3+
# Path: /app
4+
WORKDIR /app
5+
6+
COPY ./Pipfile ./Pipfile.lock ./
7+
RUN ["pipenv", "requirements", "--dev", ">", "requirements.txt"]
8+
9+
FROM python:3.12-alpine as build
10+
11+
# Path: /app
12+
WORKDIR /app
13+
14+
# Path: /app/requirements.txt
15+
COPY --from=generate-requirements /app/requirements.txt ./
16+
17+
RUN ["pip", "install", "-r", "requirements.txt"]
18+
19+
COPY src .
20+
21+
ENTRYPOINT [ "uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8000", "--proxy-headers" ]
22+
23+
EXPOSE 8000

Pipfile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
fastapi = "*"
8+
aiohttp = "<4"
9+
asyncpg = ">=0.29.0"
10+
sqlalchemy = {extras = ["asyncio"], version = "*"}
11+
12+
[dev-packages]
13+
uvicorn = {extras = ["standard"] }
14+
15+
[requires]
16+
python_version = "3.12"
17+
18+
[pipenv]
19+
allow_prereleases = true

0 commit comments

Comments
 (0)