Merge pull request #50 from waja/backup_cleanup
Using zammad-postgresql for backup purpose
This commit is contained in:
commit
8b61c61bbd
@ -1,33 +0,0 @@
|
||||
FROM debian
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
|
||||
ENV BACKUP_SLEEP 86400
|
||||
ENV HOLD_DAYS 10
|
||||
ENV ZAMMAD_DIR /home/zammad
|
||||
ENV BACKUP_DIR /var/tmp/zammad
|
||||
|
||||
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
org.label-schema.name="Zammad" \
|
||||
org.label-schema.license="AGPL-3.0" \
|
||||
org.label-schema.description="Docker container for Zammad - Backup container" \
|
||||
org.label-schema.url="https://zammad.org" \
|
||||
org.label-schema.vcs-url="https://github.com/zammad/zammad" \
|
||||
org.label-schema.vcs-type="Git" \
|
||||
org.label-schema.vendor="Zammad" \
|
||||
org.label-schema.schema-version="1.2" \
|
||||
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
|
||||
|
||||
RUN apt-get update;apt-get -y wget gnupg2 \
|
||||
&& wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - \
|
||||
&& echo "deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main" >> /etc/apt/sources.list.d/postgres.list \
|
||||
&& apt-get update;apt-get -y install postgresql-client \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# create entrypoint
|
||||
COPY containers/zammad-backup/docker-entrypoint.sh /
|
||||
RUN chmod +x /docker-entrypoint.sh
|
||||
|
||||
# docker init
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["zammad-backup"]
|
@ -2,6 +2,11 @@ FROM postgres:9.6-alpine
|
||||
MAINTAINER Zammad <info@zammad.org>
|
||||
ARG BUILD_DATE
|
||||
|
||||
ENV BACKUP_SLEEP 86400
|
||||
ENV HOLD_DAYS 10
|
||||
ENV ZAMMAD_DIR /home/zammad
|
||||
ENV BACKUP_DIR /var/tmp/zammad
|
||||
|
||||
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
org.label-schema.name="Zammad" \
|
||||
org.label-schema.license="AGPL-3.0" \
|
||||
@ -12,3 +17,7 @@ LABEL org.label-schema.build-date="$BUILD_DATE" \
|
||||
org.label-schema.vendor="Zammad" \
|
||||
org.label-schema.schema-version="1.2" \
|
||||
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
|
||||
|
||||
# copy backup script
|
||||
COPY containers/zammad-postgresql/backup.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/backup.sh
|
||||
|
@ -5,7 +5,7 @@ services:
|
||||
zammad-backup:
|
||||
depends_on:
|
||||
- zammad-railsserver
|
||||
image: zammad/zammad-docker-compose:zammad-backup
|
||||
image: zammad/zammad-docker-compose:zammad-postgresql
|
||||
labels:
|
||||
io.rancher.container.pull_image: always
|
||||
links:
|
||||
@ -14,6 +14,8 @@ services:
|
||||
volumes:
|
||||
- data-zammad:/home/zammad
|
||||
- backup-zammad:/var/tmp/zammad
|
||||
entrypoint: /usr/local/bin/backup.sh
|
||||
command: zammad-backup
|
||||
|
||||
zammad-elasticsearch:
|
||||
image: zammad/zammad-docker-compose:zammad-elasticsearch
|
||||
|
@ -3,4 +3,4 @@
|
||||
# build hooks config
|
||||
#
|
||||
|
||||
DOCKER_IMAGES="zammad zammad-backup zammad-elasticsearch zammad-nginx zammad-postgresql"
|
||||
DOCKER_IMAGES="zammad zammad-elasticsearch zammad-nginx zammad-postgresql"
|
||||
|
Loading…
Reference in New Issue
Block a user