Created
January 15, 2016 22:00
-
-
Save fommil/cb964ce566a4f138d443 to your computer and use it in GitHub Desktop.
drone upstart config
This file contains hidden or 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 "Drone docker container" | |
start on filesystem and started docker | |
stop on runlevel [!2345] | |
kill timeout 20 | |
pre-start script | |
docker stop drone || true | |
docker rm drone || true | |
docker pull drone/drone:0.4 || true | |
end script | |
script | |
docker run \ | |
--name drone \ | |
--volume /var/lib/drone:/var/lib/drone \ | |
--volume /var/run/docker.sock:/var/run/docker.sock \ | |
--env-file /etc/drone/dronerc \ | |
--restart=always \ | |
--publish=80:8000 \ | |
--detach=true \ | |
drone/drone:0.4 | |
end script | |
post-stop script | |
docker stop drone | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment