[ADD]Odoo backups : add optional healthchecks URL
This commit is contained in:
parent
5e3437cc6e
commit
1c41f871a0
@ -8,7 +8,7 @@ WORKDIR /home/odoo
|
||||
USER root
|
||||
|
||||
RUN mkdir backups
|
||||
RUN apt-get install -y --no-install-recommends cron gettext-base
|
||||
RUN apt-get install -y --no-install-recommends cron gettext-base curl
|
||||
|
||||
# Avoid overlayfs bug with tail
|
||||
VOLUME /var/log
|
||||
@ -16,6 +16,7 @@ VOLUME /var/log
|
||||
COPY crontab ./crontab
|
||||
|
||||
COPY backup.template .
|
||||
COPY hc.template .
|
||||
COPY plan.py .
|
||||
COPY launch.sh .
|
||||
|
||||
|
@ -8,7 +8,7 @@ WORKDIR /home/odoo
|
||||
USER root
|
||||
|
||||
RUN mkdir backups
|
||||
RUN yum install -y gettext cronie
|
||||
RUN yum install -y gettext cronie curl
|
||||
|
||||
# Avoid overlayfs bug with tail
|
||||
VOLUME /var/log
|
||||
@ -16,6 +16,7 @@ VOLUME /var/log
|
||||
COPY crontab ./crontab
|
||||
|
||||
COPY backup.template .
|
||||
COPY hc.template .
|
||||
COPY plan.py .
|
||||
COPY launch.c7.sh launch.sh
|
||||
|
||||
|
1
odoo/backups/hc.template
Normal file
1
odoo/backups/hc.template
Normal file
@ -0,0 +1 @@
|
||||
curl -m 10 --retry 5 ${HC_URL}
|
@ -19,5 +19,8 @@ do
|
||||
envsubst < /home/odoo/backup.template >> /home/odoo/backup.sh
|
||||
((index++))
|
||||
done
|
||||
if ! [ -z ${HC_URL} ]; then
|
||||
envsubst < /home/odoo/hc.template >> /home/odoo/backup.sh
|
||||
fi
|
||||
chown odoo:odoo /home/odoo/backup.sh
|
||||
crontab ./crontab && touch /var/log/cron.log && crond && tail -f /var/log/cron.log
|
||||
|
@ -19,5 +19,8 @@ do
|
||||
envsubst < /home/odoo/backup.template >> /home/odoo/backup.sh
|
||||
((index++))
|
||||
done
|
||||
if ! [ -z ${HC_URL} ]; then
|
||||
envsubst < /home/odoo/hc.template >> /home/odoo/backup.sh
|
||||
fi
|
||||
chown odoo:odoo /home/odoo/backup.sh
|
||||
crontab ./crontab && touch /var/log/cron.log && cron && tail -f /var/log/cron.log
|
||||
|
Loading…
Reference in New Issue
Block a user