Created
April 29, 2022 06:33
-
-
Save chrimaho/c25d5b4031d0f9eef5c99fe4cd27e78f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image | |
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.7 | |
# Load requirements | |
COPY requirements.txt . | |
# Install dependencies | |
RUN pip3 install --upgrade pip | |
RUN pip3 install --no-cache-dir -r requirements.txt | |
RUN pip3 install --upgrade uvicorn[standard] | |
# Copy static files | |
COPY templates templates | |
COPY src src | |
# Change working directory | |
WORKDIR /app | |
# Set command line | |
CMD [ "uvicorn" \ | |
, "main:app" \ | |
, "--app-dir", "/src/api" \ | |
, "--host", "0.0.0.0" \ | |
, "--port", "8880" \ | |
, "--root-path", "." \ | |
, "--reload" \ | |
, "--use-colors" \ | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment