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

Event Timeline

valerio.bozzolan triaged this task as Normal priority.Sun, Jan 3, 21:32
valerio.bozzolan created this task.
Restricted Application added a project: User-valerio.bozzolan. · View Herald TranscriptSun, Jan 3, 21:32
valerio.bozzolan closed this task as Resolved.Mon, Jan 11, 23:37
valerio.bozzolan updated the task description. (Show Details)
valerio.bozzolan moved this task from Febrary 2021 to January 2021 on the Border Radio board.