diff options
author | terminaldweller <thabogre@gmail.com> | 2021-07-29 16:58:24 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2021-07-29 16:58:24 +0000 |
commit | 5f67821f49a8e3c4573c4d3a8af977ff61dd51f3 (patch) | |
tree | 8205ae4a8e527d0d0e34a0821471f106ab7fc4a6 /.gitpod.Dockerfile | |
parent | no need for externally getting the links. devourer can do that on its own now... (diff) | |
download | devourer-5f67821f49a8e3c4573c4d3a8af977ff61dd51f3.tar.gz devourer-5f67821f49a8e3c4573c4d3a8af977ff61dd51f3.zip |
added config for newspaper. added gitpod configs.
Diffstat (limited to '.gitpod.Dockerfile')
-rw-r--r-- | .gitpod.Dockerfile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..2f126fa --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,27 @@ +FROM gitpod/workspace-full +FROM python:3.8.11-slim as python-base +ENV PYTHONUNBUFFERED=1 \ + PYTHONDONTWRITEBYTECODE=1 \ + PIP_NO_CACHE_DIR=off \ + PIP_DISABLE_PIP_VERSION_CHECK=on \ + PIP_DEFAULT_TIMEOUT=100 \ + POETRY_HOME="/poetry" \ + POETRY_VIRTUALENVS_IN_PROJECT=true \ + POETRY_NO_INTERACTION=1 \ + PYSETUP_PATH="/devourer" \ + VENV_PATH="/devourer/.venv" +ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH" + +FROM python-base as builder-base +ENV POETRY_VERSION=1.0.0 +RUN apt update && apt install -y --no-install-recommends curl build-essential +RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python +WORKDIR $PYSETUP_PATH +COPY ./pyproject.toml ./ +RUN poetry install --no-dev + +FROM python-base as production +ENV FASTAPI_ENV=production +COPY --from=builder-base $VENV_PATH $VENV_PATH +COPY ./main.py $PYSETUP_PATH/main.py +ENTRYPOINT $PYSETUP_PATH/main.py |