compose-website/unit-files/nginx@.service

29 lines
615 B
SYSTEMD
Raw Normal View History

[Unit]
Description=%p-%i
2014-10-27 12:32:21 +00:00
# Requirements
Requires=docker.service
2014-10-10 17:08:14 +00:00
Requires=etcd.service
Requires=%p-importer@%i.service
2014-10-10 17:08:14 +00:00
Requires=%p-discovery@%i.service
2014-10-27 12:32:21 +00:00
# Dependency ordering
2014-10-10 17:08:14 +00:00
Before=%p-discovery@%i.service
2014-10-27 12:32:21 +00:00
After=docker.service
After=%p-importer@%i.service
[Service]
Restart=always
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill %p-%i
ExecStartPre=-/usr/bin/docker rm %p-%i
2014-10-27 12:32:21 +00:00
ExecStart=/usr/bin/docker run \
--name %p-%i \
-v /data/per-user/%i/%p/data/www-content:/app \
indiehosters/nginx
ExecReload=/usr/bin/docker restart %p-%i
ExecStop=/usr/bin/docker stop %p-%i
[Install]
WantedBy=multi-user.target