compose-website/unit-files/mysql@.service
2014-12-03 17:13:03 +00:00

27 lines
633 B
Desktop File

[Unit]
Description=%p-%i
# Requirements
Requires=docker.service
Requires=%p-importer@%i.service
# Dependency ordering
After=docker.service
After=%p-importer@%i.service
Before=backup@%i.timer
[Service]
Restart=always
ExecStartPre=-/usr/bin/docker kill %p-%i
ExecStartPre=-/usr/bin/docker rm %p-%i
ExecStart=/usr/bin/docker run \
--name %p-%i \
-v /data/runtime/domains/%i/%p/db_files:/var/lib/mysql \
-e STARTUP_SQL="/data/domains/%i/%p/dump.sql" \
--env-file /data/domains/%i/%p/.env \
indiehosters/mysql
ExecReload=/usr/bin/docker restart %p-%i
ExecStop=/usr/bin/docker stop %p-%i
[Install]
WantedBy=multi-user.target