Page MenuHomeGitPull.it

Create Docker Libretime systemd service
Closed, ResolvedPublic1 Points

Description

Previously there is no systemd service for the Libretime's docker image.

/etc/systemd/system/libretime.service
[Unit]
Description=Starts LibreTime
After=network.target

[Service]
ExecStart=docker-compose -f /opt/libretime/docker-compose.yml up

# If AUTOSSH_GATETIME is set to 0 autossh will restart even if ssh fails on the first run with an exit status of 1
Environment="AUTOSSH_GATETIME=0"

# restart autossh if something goes wrong
Restart=on-failure

# wait some seconds before retrying
RestartSec=3

# disable any kind of restart rate limiting
# not supported in our version
#StartLimitIntervalSec=0

[Install]
WantedBy=multi-user.target
root@border-regia:/etc/systemd/system# sudo nano libretime.service 
root@border-regia:/etc/systemd/system# cat nano libretime.service 
cat: nano: No such file or directory
[Unit]
Description=Starts LibreTime
After=network.target
Documentation=https://gitpull.it/T679

[Service]
ExecStart=docker-compose -f /opt/libretime/docker-compose.yml up

# If AUTOSSH_GATETIME is set to 0 autossh will restart even if ssh fails on the first run with an exit status of 1
Environment="AUTOSSH_GATETIME=0"

# restart autossh if something goes wrong
Restart=on-failure

# wait some seconds before retrying
RestartSec=3

# disable any kind of restart rate limiting
# not supported in our version
#StartLimitIntervalSec=0

[Install]
WantedBy=multi-user.target