1
0
forked from infra/ansible
infra/roles/hedgedoc/templates/hedgedoc.service.j2

29 lines
510 B
Plaintext
Raw Normal View History

2018-04-09 21:28:36 +02:00
[Unit]
Description=hedgedoc service using docker compose
Requires=docker.service
After=docker.service
Before=nginx.service
2018-04-09 21:28:36 +02:00
[Service]
Type=simple
User=hedgedoc
Group=hedgedoc
Restart=always
TimeoutStartSec=1200
WorkingDirectory=/opt/hedgedoc
# Make sure no old containers are running
ExecStartPre=/usr/bin/docker-compose down -v
# Compose up
ExecStart=/usr/bin/docker-compose up
# Compose down, remove containers and volumes
ExecStop=/usr/bin/docker-compose down -v
2018-04-09 21:28:36 +02:00
[Install]
WantedBy=multi-user.target