ansible/roles/searxng/templates/searxng.service.j2

33 lines
597 B
Plaintext
Raw Normal View History

2024-11-14 18:24:43 +01:00
[Unit]
Description=searxng service using docker compose
Requires=docker.service
After=docker.service
Before=nginx.service
[Service]
Type=simple
User=searxng
Group=searxng
Restart=always
TimeoutStartSec=1200
WorkingDirectory=/opt/searxng
# Update images
ExecStartPre=-/usr/bin/docker-compose pull --quiet
# Compose up
ExecStart=/usr/bin/docker-compose up
# Compose down, remove containers and volumes
ExecStop=/usr/bin/docker-compose down -v
# Refresh on reload
ExecReload=-/usr/bin/docker-compose pull --quiet
ExecReload=/usr/bin/docker-compose up -d
[Install]
WantedBy=multi-user.target