Created
July 18, 2014 15:38
-
-
Save tad-lispy/e8b46f8cdb67dafa33c7 to your computer and use it in GitHub Desktop.
Upstart Docker services with relaying on mongo container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Microserver container" | |
author "Tadeusz Łazurski <tadeusz@lazurski.pl>" | |
start on filesystem and started docker and started mongo-container | |
stop on runlevel [!2345] | |
respawn | |
exec /usr/bin/docker start -a microserver | |
pre-start exec sleep 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "Mongo container" | |
author "Tadeusz Łazurski <tadeusz@lazurski.pl>" | |
start on filesystem and started docker | |
stop on runlevel [!2345] | |
respawn | |
script | |
/usr/bin/docker start -a mongo | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note 30 seconds sleep before start. It seems without it sometimes (not always) conteiner doesn't start with
This seems to do the trick.