add dockerfile
This commit is contained in:
parent
f8f2c83d6d
commit
fa05870cbc
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim AS backend-builder
|
||||
WORKDIR /app
|
||||
|
||||
COPY requierements.txt /app/
|
||||
|
||||
|
||||
RUN pip install --upgrade pip
|
||||
RUN pip install -r requierements.txt
|
||||
|
||||
# Create the final image
|
||||
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.11-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=backend-builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
|
||||
COPY app /app/app
|
||||
|
||||
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
|
Loading…
x
Reference in New Issue
Block a user