v0.1: The first version of backup script

This commit is contained in:
Eugene Morozov
2022-02-14 08:07:43 +00:00
parent 99f6445067
commit 8f006b16b6
9 changed files with 717 additions and 86 deletions

32
Dockerfile.pg13 Normal file
View File

@@ -0,0 +1,32 @@
FROM python:3.10-slim-bullseye
ENV HOME=/home/app \
APP_HOME=/home/app/docker-postgres-backup \
\
# python
PYTHONPATH=${PYTHONPATH}:${PWD} \
PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
\
# pip
PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=on \
PIP_DEFAULT_TIMEOUT=100 \
\
# language locales
LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
RUN apt-get update && apt-get install -y --no-install-recommends locales postgresql-client-13 tini && \
apt-get -y --purge autoremove && apt-get clean && rm -rf /var/cache/apt && \
sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen && pip install -U pip
COPY ./ $APP_HOME
WORKDIR $APP_HOME
RUN python -m pip install $APP_HOME
ENTRYPOINT ["tini", "--"]
CMD ["python", "start.py"]