2015-09-18 11:42:29 +00:00
|
|
|
[Unit]
|
|
|
|
Description=%p-%i
|
|
|
|
|
|
|
|
# Requirements
|
|
|
|
Requires=docker.service
|
|
|
|
|
|
|
|
# Dependency ordering
|
|
|
|
After=docker.service
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Restart=always
|
|
|
|
RestartSec=10
|
|
|
|
TimeoutStartSec=60
|
|
|
|
TimeoutStopSec=15
|
2016-02-25 11:43:51 +00:00
|
|
|
EnvironmentFile=-/data/domains/%i/env
|
2016-11-26 10:47:05 +00:00
|
|
|
Environment=HOSTNAME=%H
|
2015-09-18 11:42:29 +00:00
|
|
|
WorkingDirectory=/data/domains/%i/
|
|
|
|
ExecStartPre=-/opt/bin/docker-compose rm -f
|
2017-06-30 10:51:54 +00:00
|
|
|
ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i,www.%i /opt/bin/docker-compose up"
|
2015-09-18 11:42:29 +00:00
|
|
|
ExecStop=/opt/bin/docker-compose stop
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|