Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Terkwood/7a01ad35f500934baf4da8a9dd2f8767 to your computer and use it in GitHub Desktop.
Save Terkwood/7a01ad35f500934baf4da8a9dd2f8767 to your computer and use it in GitHub Desktop.
$ sudo vim /etc/systemd/system/docker-compose.service
[Unit]
Description=DockerCompose
After=docker.service
Requires=docker.service
[Service]
ExecStart=/opt/bin/docker-compose -f /home/core/docker-compose.yml up -d
[Install]
WantedBy=multi-user.target
$ sudo systemctl enable /etc/systemd/system/docker-compose.service
$ sudo systemctl start docker-compose.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment