Integret s3 backup

This commit is contained in:
2023-12-17 13:30:07 +01:00
parent 44db1b1a62
commit 4d8168669f
8 changed files with 236 additions and 84 deletions

View File

@@ -4,7 +4,8 @@ ENV DB_DATABASE=""
ENV DB_USERNAME=""
ENV DB_PASSWORD=""
ENV DB_PORT="3306"
ENV STORAGE=local
ENV DESTINATION=local
ENV SOURCE=local
ENV BUCKETNAME=""
ENV ACCESS_KEY=""
ENV SECRET_KEY=""
@@ -22,13 +23,11 @@ RUN mkdir /tmp/s3cache
RUN chmod 777 /s3mnt
RUN chmod 777 /tmp/s3cache
COPY src/backup.sh /usr/local/bin/
COPY src/restore.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/backup.sh
RUN chmod +x /usr/local/bin/restore.sh
COPY src/mysql_bkup.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/mysql_bkup.sh
RUN ln -s /usr/local/bin/backup.sh /usr/local/bin/backup
RUN ln -s /usr/local/bin/restore.sh /usr/local/bin/restore
RUN ln -s /usr/local/bin/mysql_bkup.sh /usr/local/bin/mysql_bkup
RUN ln -s /usr/local/bin/mysql_bkup.sh /usr/local/bin/bkup
RUN mkdir /backup
WORKDIR /backup