Skip to content

Instantly share code, notes, and snippets.

@amackiewicz
Created September 25, 2019 03:51
Show Gist options
  • Save amackiewicz/50367386cc6b2f30ec3b7414690a6e83 to your computer and use it in GitHub Desktop.
Save amackiewicz/50367386cc6b2f30ec3b7414690a6e83 to your computer and use it in GitHub Desktop.
Linux service systemctl
# /etc/systemd/system/drone.service
[Unit]
Description=Drone server
After=docker.service nginx.service
[Service]
Restart=always
ExecStart=/usr/local/bin/docker-compose -f /etc/drone/docker-compose.yml up
ExecStop=/usr/local/bin/docker-compose -f /etc/drone/docker-compose.yml stop
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment