23 lines
474 B
Desktop File
23 lines
474 B
Desktop File
[Unit]
|
|
Description=%p-%i
|
|
|
|
# Requirements
|
|
Requires=docker.service
|
|
|
|
# Dependency ordering
|
|
After=docker.service
|
|
|
|
[Service]
|
|
Restart=always
|
|
RestartSec=10
|
|
TimeoutStartSec=60
|
|
TimeoutStopSec=15
|
|
EnvironmentFile=-/data/domains/%i/env
|
|
Environment=HOSTNAME=%H
|
|
WorkingDirectory=/data/domains/%i/
|
|
ExecStartPre=-/opt/bin/docker-compose rm -f
|
|
ExecStart=/bin/bash -euxc "VIRTUAL_HOST=%i /opt/bin/docker-compose up"
|
|
ExecStop=/opt/bin/docker-compose stop
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|