-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Amndeep7/mass_mentioner
- Loading branch information
Showing
3 changed files
with
55 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
FROM python:3.9.1-slim AS base | ||
|
||
ENV PYTHONUNBUFFERED=1 \ | ||
PYTHONDONTWRITEBYTECODE=1 \ | ||
PIP_NO_CACHE_DIR=off \ | ||
PIP_DISABLE_PIP_VERSION_CHECK=on \ | ||
PIP_DEFAULT_TIMEOUT=100 \ | ||
POETRY_HOME="/opt/poetry" \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=true \ | ||
POETRY_NO_INTERACTION=1 \ | ||
PYSETUP_PATH="/opt/pysetup" \ | ||
VENV_PATH="/opt/pysetup/.venv" | ||
|
||
ENV PATH="$POETRY_HOME/bin:$VENV_PATH/bin:$PATH" | ||
|
||
FROM base AS builder | ||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
build-essential \ | ||
curl | ||
|
||
ENV POETRY_VERSION=1.1.5 | ||
RUN curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python | ||
|
||
WORKDIR $PYSETUP_PATH | ||
COPY ./poetry.lock ./pyproject.toml ./ | ||
RUN poetry install --no-dev | ||
|
||
FROM base AS production | ||
|
||
COPY --from=builder $VENV_PATH $VENV_PATH | ||
|
||
RUN . $VENV_PATH/bin/activate | ||
|
||
COPY ./.env /.env | ||
COPY ./mass_mentioner/mass_mentioner.py /mass_mentioner/mass_mentioner.py | ||
|
||
ENTRYPOINT ["python3", "/mass_mentioner/mass_mentioner.py"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: '3.7' | ||
services: | ||
mass_mentioner: | ||
build: . | ||
image: mass_mentioner:v0.1.0 | ||
restart: always |