Last active
November 24, 2021 18:50
-
-
Save qwo/b970a50059569316565244e9ea129ef3 to your computer and use it in GitHub Desktop.
gunicorn docker
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
FROM python:3.7.2 | |
COPY . /app | |
WORKDIR /app | |
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=/opt/poetry python | |
ENV PATH="${PATH}:/opt/poetry/bin" | |
RUN ln -s /opt/poetry/bin/poetry poetry | |
RUN poetry config virtualenvs.create false | |
RUN poetry install --no-root --no-dev | |
ENV PORT 8000 | |
WORKDIR "dockerip" | |
CMD ["gunicorn", "--bind", "$PORT", "main:app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment