Skip to content

Instantly share code, notes, and snippets.

@fommil
Created January 15, 2016 22:00
Show Gist options
  • Save fommil/cb964ce566a4f138d443 to your computer and use it in GitHub Desktop.
Save fommil/cb964ce566a4f138d443 to your computer and use it in GitHub Desktop.
drone upstart config
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