diff --git a/README.md b/README.md index b2e3311..3591612 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ dockerfiles - [ ] gitolite - [ ] hashcat - [ ] irc +- [ ] nodebb - [ ] tshark ## DONE @@ -88,6 +89,7 @@ dockerfiles ## 3rd-party - [x] centurylink/watchtower +- [x] drone/drone - [x] ghost - [x] gitlab/gitlab-ce - [ ] gliderlabs/logspout diff --git a/drone/README.md b/drone/README.md new file mode 100644 index 0000000..edf7a27 --- /dev/null +++ b/drone/README.md @@ -0,0 +1,80 @@ +drone +===== + +[Drone][1] is a Continuous Integration platform built on Docker, written in Go. + +## github + +```yaml +# +# Github » Settings » Applications » Developer applications » Register new application +# +Application name: drone +Homepage URL: http://drone.datageek.info/ +Application description: Drone is a Continuous Integration platform built on Docker, written in Go +Authorization callback URL: http://drone.datageek.info/authorize +Client ID: ... (generated by github) +Client Secret: ... (generated by github) +``` + +## docker-compose.yml + +```yaml +drone: + image: drone/drone:0.4 + ports: + - "8000:8000" + volumes: + - ./drone:/var/lib/drone + - /var/run/docker.sock:/var/run/docker.sock + env_file: ./dronerc + restart: always +``` + +## dronerc + +```bash +REMOTE_DRIVER=github +REMOTE_CONFIG=https://github.com?client_id=...&client_secret=... +``` + +## nginx/sites-enabled/drone + +``` +server { + listen 80; + server_name drone.datageek.info; + location / { + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header Host $http_host; + proxy_set_header Origin ""; + + proxy_pass http://127.0.0.1:8000; + proxy_redirect off; + proxy_http_version 1.1; + proxy_buffering off; + + chunked_transfer_encoding off; + } +} +``` + +## up and running + +``` +# server +$ cd ~/fig/drone/ +$ docker-compose up -d +$ docker-compose logs + +# client +$ firefox http://drone.datageek.info/settings/profile +$ curl http://downloads.drone.io/drone-cli/drone_darwin_amd64.tar.gz | tar zx -C /usr/local/bin/ +$ export DRONE_SERVER=http://drone.datageek.info/ +$ export DRONE_TOKEN=... +$ drone help +``` + +[1]: http://readme.drone.io/usage/overview/ diff --git a/drone/docker-compose.yml b/drone/docker-compose.yml new file mode 100644 index 0000000..ded6031 --- /dev/null +++ b/drone/docker-compose.yml @@ -0,0 +1,9 @@ +drone: + image: drone/drone:0.4 + ports: + - "8000:8000" + volumes: + - ./drone:/var/lib/drone + - /var/run/docker.sock:/var/run/docker.sock + env_file: ./dronerc + restart: always