Skip to content

Instantly share code, notes, and snippets.

@qweliant
Last active September 1, 2020 19:34
Show Gist options
  • Save qweliant/cc0f9cae822cfee39f58e1fbb32ad457 to your computer and use it in GitHub Desktop.
Save qweliant/cc0f9cae822cfee39f58e1fbb32ad457 to your computer and use it in GitHub Desktop.
docker container for deployment
FROM python:3.7
COPY ./requirements/requirements.txt ./requirements/requirements.txt
RUN pip3 install -r requirements/requirements.txt
COPY ./app /app
RUN useradd -m myuser
USER myuser
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment