Skip to content

Instantly share code, notes, and snippets.

@jice-lavocat
Created January 30, 2016 16:49
Show Gist options
  • Save jice-lavocat/ce1b2ad78b0e7e1f0684 to your computer and use it in GitHub Desktop.
Save jice-lavocat/ce1b2ad78b0e7e1f0684 to your computer and use it in GitHub Desktop.
Upstart Docker-Compose on Ubuntu
# File is saved under /etc/init/start_containers.conf
# After file is modified, update config with : $ initctl reload-configuration
description "Start containers (see http://askubuntu.com/a/22105 and http://askubuntu.com/questions/612928/how-to-run-docker-compose-at-bootup)"
start on filesystem and started docker
stop on runlevel [!2345]
# if you want it to automatically restart if it crashes, leave the next line in
# respawn # might cause over charge
script
docker-compose -f /home/jice/web/docker-compose.yml up -d
end script
@pbelskiy
Copy link

initctl restart will not work here

@wisefin-yu
Copy link

docker-compose.yaml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment