Manage Docker-Compose With Systemd on Ubuntu

What do we want to achieve?

Let’s start

Create a generalized service for docker-compose

Create a folder to put the actual docker-compose & put docker-compose.yml.

root@vagrant:/home/vagrant# wget https://gist.github.com/spy86/2413ad5621de106b906cf7b0be047328
root@vagrant:/home/vagrant# sudo mkdir -p /etc/docker/compose/wordpress
root@vagrant:/home/vagrant# cp docker-compose.yaml /etc/docker/compose/wordpress/

Service start

root@vagrant:/home/vagrant# sudo systemctl start docker-compose@wordpress

Conclusion

DevOps Consultant. I’m strongly focused on automation, security, and reliability.