mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-24 08:52:31 +02:00
1.7 KiB
1.7 KiB
drone
Drone is a Continuous Integration platform built on Docker, written in Go.
github
drone:
image: drone/drone:1.5-linux-amd64
ports:
- "8080:80"
volumes:
- ./data:/data
environment:
- DRONE_AGENTS_ENABLED=true
- DRONE_SERVER_PROTO=http
- DRONE_SERVER_HOST=drone.easypi.pro
- DRONE_RPC_SECRET=secret
- DRONE_GITHUB_SERVER=https://github.com
- DRONE_GITHUB_CLIENT_ID=xxxxxx
- DRONE_GITHUB_CLIENT_SECRET=xxxxxx
restart: always
#
# Github » Settings » Applications » Developer applications » Register new application
#
Application name: drone
Homepage URL: http://drone.easypi.pro/
Application description: Drone is a Continuous Integration platform built on Docker, written in Go
Authorization callback URL: http://drone.easypi.pro/authorize
Client ID: ... (generated by github)
Client Secret: ... (generated by github)
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.pro;
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:8080;
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 -f
# client (login with remote driver credential)
$ firefox http://drone.easypi.pro/