Skip to content

Instantly share code, notes, and snippets.

@alexd73
Last active February 8, 2019 12:33
Show Gist options
  • Save alexd73/d31fa3c3406baae984eee8fedd28135f to your computer and use it in GitHub Desktop.
Save alexd73/d31fa3c3406baae984eee8fedd28135f to your computer and use it in GitHub Desktop.
create service with docker-compose in ubuntu
# /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