Skip to content

Instantly share code, notes, and snippets.

@heyimalex
Created March 19, 2014 19:27
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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