Skip to content

Instantly share code, notes, and snippets.

@heyimalex
Created March 19, 2014 19:27
Show Gist options
  • Save heyimalex/9649374 to your computer and use it in GitHub Desktop.
Save heyimalex/9649374 to your computer and use it in GitHub Desktop.
fig upstart script
description "fig service runner"
start on filesystem and started docker
stop on runlevel [!2345]
respawn
chdir /wherever/your/fig/file/is
script
# Wait for docker to finish starting up first.
FILE=/var/run/docker.sock
while [ ! -e $FILE ] ; do
inotifywait -t 2 -e create $(dirname $FILE)
done
/usr/local/bin/fig up
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment