34 lines
1.1 KiB
Desktop File
34 lines
1.1 KiB
Desktop File
# DevOps Infrastructure - Restic REST Server
|
|
# =============================================================================
|
|
# Manages restic REST server for centralized workstation backups
|
|
#
|
|
# Deploy: sudo cp this file to /etc/systemd/system/devops.service
|
|
# sudo systemctl daemon-reload
|
|
# sudo systemctl enable devops
|
|
# =============================================================================
|
|
|
|
[Unit]
|
|
Description=Restic REST Server - Backup Infrastructure
|
|
Documentation=https://github.com/restic/rest-server
|
|
Requires=docker.service
|
|
After=docker.service network-online.target
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
RemainAfterExit=yes
|
|
WorkingDirectory=/bigdisk/restic
|
|
|
|
# Start restic REST server
|
|
ExecStart=/usr/bin/docker-compose -f /bigdisk/restic/docker-compose.yml up -d
|
|
|
|
# Stop restic REST server
|
|
ExecStop=/usr/bin/docker-compose -f /bigdisk/restic/docker-compose.yml down
|
|
|
|
# Reload restic REST server
|
|
ExecReload=/usr/bin/docker-compose -f /bigdisk/restic/docker-compose.yml up -d --force-recreate
|
|
|
|
TimeoutStartSec=120
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|