celery log example with different settings

This commit is contained in:
2021-09-06 20:16:01 +03:00
parent a99094e6b1
commit 53967d3961
19 changed files with 867 additions and 19 deletions

View File

@@ -0,0 +1,45 @@
FROM python:3.8.9-slim-buster
ENV BUILD_ONLY_PACKAGES='wget' \
# python:
PYTHONFAULTHANDLER=1 \
PYTHONUNBUFFERED=1 \
PYTHONHASHSEED=random \
PYTHONDONTWRITEBYTECODE=1 \
# pip:
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
# poetry:
POETRY_VERSION=1.1.4 \
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/pypoetry' \
PATH="$PATH:/root/.poetry/bin"
# System deps:
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
bash \
build-essential \
gettext \
libpq-dev \
nano \
curl \
# Defining build-time-only dependencies:
$BUILD_ONLY_PACKAGES \
&& curl -sSL 'https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py' | python \
&& poetry --version \
# Removing build-time-only dependencies:
&& apt-get remove -y $BUILD_ONLY_PACKAGES \
# Cleaning cache:
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* \
&& rm -rf $POETRY_CACHE_DIR
WORKDIR /code
# Copy only requirements, to cache them in docker layer
COPY ./poetry.lock ./pyproject.toml /code/
RUN poetry install
COPY . /code