update drone ci cd

pull/111/head
Bo-Yi Wu 2018-01-14 14:36:00 +08:00 committed by GitHub
parent 146c275e3b
commit c43b2e04ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 10 deletions

View File

@ -8,7 +8,7 @@
**1. 在Github上创建一个新的OAtuh应用** **1. 在Github上创建一个新的OAtuh应用**
访问https://github.com/settings/applications/new创建新的OAuth应用。 访问[此頁面](https://github.com/settings/applications/new)创建新的OAuth应用。
![OAuth注册](../images/github-oauth-register.jpg) ![OAuth注册](../images/github-oauth-register.jpg)
@ -31,22 +31,25 @@ version: '2'
services: services:
drone-server: drone-server:
image: drone/drone:0.7 image: drone/drone:0.8
ports: ports:
- 80:8000 - 80:8000
- 9000
volumes: volumes:
- /var/lib/drone:/var/lib/drone/ - /var/lib/drone:/var/lib/drone/
restart: always restart: always
environment: environment:
- DRONE_OPEN=true - DRONE_OPEN=true
- DRONE_ADMIN=jimmy - DRONE_HOST=${DRONE_HOST}
- DRONE_HOST=localhost
- DRONE_GITHUB=true - DRONE_GITHUB=true
- DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT} - DRONE_GITHUB_CLIENT=${DRONE_GITHUB_CLIENT}
- DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET} - DRONE_GITHUB_SECRET=${DRONE_GITHUB_SECRET}
- DRONE_SECRET=admin - DRONE_SECRET=${DRONE_SECRET}
drone-agent: drone-agent:
image: drone/drone:0.7 image: drone/agent:0.8
command: agent command: agent
restart: always restart: always
depends_on: depends_on:
@ -54,8 +57,8 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
environment: environment:
- DRONE_SERVER=ws://drone-server:8000/ws/broker - DRONE_SERVER=drone-server:9000
- DRONE_SECRET=admin - DRONE_SECRET=${DRONE_SECRET}
``` ```
- `/var/lib/drone`是在本地挂载的目录请确保该目录已存在且可以被docker访问到Mac下可以在docker的共享目录中配置。 - `/var/lib/drone`是在本地挂载的目录请确保该目录已存在且可以被docker访问到Mac下可以在docker的共享目录中配置。
@ -72,7 +75,7 @@ docker-compose up
这样是在前台启动,加上`-d`参数就可以在后台启动。 这样是在前台启动,加上`-d`参数就可以在后台启动。
访问http://localhost可以看到登陆画面。 访问 `http://localhost` 可以看到登陆画面。
![Drone登陆界面](../images/drone-login-github.jpg) ![Drone登陆界面](../images/drone-login-github.jpg)