Skip to content
Snippets Groups Projects
Commit 7804297d authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Fixes infinity of containers

parent aed1e509
No related branches found
No related tags found
No related merge requests found
......@@ -3,11 +3,15 @@ Description=Back up domain data to a git repo and push it out
[Service]
Type=oneshot
ExecStartPre=-/usr/bin/docker kill mysqldump-%i
ExecStartPre=-/usr/bin/docker rm mysqldump-%i
ExecStartPre=/bin/bash -euxc ' \
if [ -d /data/domains/%i/mysql ]; then \
echo "Backing up mysql databases for %i"; \
mysql_passwd=`cat /data/domains/%i/mysql/.env | cut -d= -f2`; \
/usr/bin/docker run \
--rm \
--name mysqldump-%i \
--link mysql-%i:db \
--env-file /data/domains/%i/mysql/.env \
indiehosters/mysql \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment