2018-04-09 21:28:36 +02:00
|
|
|
[Unit]
|
2022-09-02 21:11:04 +02:00
|
|
|
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
|
2022-09-02 21:11:04 +02:00
|
|
|
|
|
|
|
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
|