homelab infrastructure services
1# Template for Docker services that depend on tinsnip infrastructure
2# Copy this file and modify for your specific service
3
4[Unit]
5Description=Docker Service
6After=network-online.target docker.service
7Requires=docker.service
8
9[Service]
10Type=simple
11Restart=always
12RestartSec=10
13
14# Wait for tinsnip infrastructure services
15ExecStartPre=/home/%u/.local/opt/dynamicalsystem.machine/scripts/wait-for-tinsnip.sh
16
17# Your docker command here
18ExecStart=/usr/bin/docker run --rm --name myservice myimage
19
20# Stop command
21ExecStop=/usr/bin/docker stop myservice
22
23[Install]
24WantedBy=default.target