1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-27 02:09:06 +02:00
dockerfiles/drone
2017-05-27 18:13:11 +08:00
..
arm update drone-arm 2017-05-27 18:13:11 +08:00
docker-compose.yml update drone 2016-08-01 16:41:09 +08:00
README.md update drone 2016-05-31 23:16:56 +08:00

drone

Drone is a Continuous Integration platform built on Docker, written in Go.

github

#
# Github » Settings » Applications » Developer applications » Register new application
#
Application name: drone
Homepage URL: http://drone.easypi.info/
Application description: Drone is a Continuous Integration platform built on Docker, written in Go
Authorization callback URL: http://drone.easypi.info/authorize
Client ID: ... (generated by github)
Client Secret: ... (generated by github)

docker-compose.yml

drone:
  image: drone/drone
  ports:
    - "8000:8000"
  volumes:
    - ./drone:/var/lib/drone
    - /var/run/docker.sock:/var/run/docker.sock
  environment:
    - REMOTE_DRIVER=github
    - REMOTE_CONFIG=https://github.com?client_id=...&client_secret=...
#   - REMOTE_DRIVER=gogs
#   - REMOTE_CONFIG=https://git.easypi.info/?open=false
    - DEBUG=false
  restart: always

wall:
  image: drone/drone-wall
  ports:
    - "8080:80"
  restart: always

Drone will register gogs webhooks automatically, you don't need to do it manually.

nginx/sites-enabled/drone

server {
    listen 80;
    server_name drone.easypi.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;
    }
}

server {
    listen 80;
    server_name wall.easypi.info;
    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}

up and running

# server
$ cd ~/fig/drone/
$ docker-compose up -d
$ docker-compose logs

# client (login with remote driver credential)
$ firefox http://drone.easypi.info/

# dashboard
$ firefox http://wall.easypi.info/