Skip to content

Instantly share code, notes, and snippets.

@djamp42
Created February 23, 2021 13:31
Show Gist options
  • Save djamp42/4cbe526850b1e21fd2dd7e04204c6900 to your computer and use it in GitHub Desktop.
Save djamp42/4cbe526850b1e21fd2dd7e04204c6900 to your computer and use it in GitHub Desktop.
LibreNMS systemd Service for Docker Compose
[Unit]
Description=Docker Compose Application Service
Requires=docker.service
After=docker.service
[Service]
Type=oneshot
RemainAfterExit=yes
WorkingDirectory=/home/librenmsadmin/DockerComposeFile
ExecStart=/usr/local/bin/docker-compose up -d
ExecStop=/usr/local/bin/docker-compose down
TimeoutStartSec=0
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment