ansible-ffrgb/roles/tileserver/templates/tileserver.service.j2

29 lines
518 B
Plaintext
Raw Normal View History

[Unit]
Description=tileserver service using docker compose
Requires=docker.service
After=docker.service
Before=nginx.service
[Service]
Type=simple
User=tileserver
Group=tileserver
Restart=always
TimeoutStartSec=1200
WorkingDirectory=/opt/tileserver
# 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
[Install]
WantedBy=multi-user.target