Drone(4)Centos docker配備drone

2497 ワード

一.本文はgitea+droneの方式を採用し、その他の方式は公式文書を参照することができる.
https://docs.drone.io/
 
二.dockerを使用してdroneを迅速に導入する
docker run \
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/home/docker/drone:/data \
  --env=DRONE_GITEA_SERVER=http://gitea.example.com \
  --env=DRONE_GITEA_CLIENT_ID={DRONE_GITEA_CLIENT_ID} \
  --env=DRONE_GITEA_CLIENT_SECRET={DRONE_GITEA_CLIENT_SECRET} \
  --env=DRONE_RPC_SECRET={DRONE_RPC_SECRET} \
  --env=DRONE_SERVER_HOST=drone.example.com \
  --env=DRONE_SERVER_PROTO=http \
  --env=DRONE_TLS_AUTOCERT=false \
  --env=DRONE_SECRET={     } \
  --publish=10080:80 \
  --publish=10443:443 \
  --restart=always \
  --detach=true \
  --name=mydrone \
  drone/drone:1.1

1.ファイル共有
  --volume=/var/run/docker.sock:/var/run/docker.sock \
  --volume=/home/docker/drone:/data \

2.gitea関連構成
#gitea     
DRONE_GITEA_SERVER=http://gitea.example.com 


# CLIENT_ID   CLIENT_SECRET    gitea    
DRONE_GITEA_CLIENT_ID={DRONE_GITEA_CLIENT_ID} 
DRONE_GITEA_CLIENT_SECRET={DRONE_GITEA_CLIENT_SECRET} 

3.DRONE_を作成するGITEA_CLIENT_IDと DRONE_GITEA_CLIENT_SECRET
     3.1この住所に入る:  http://gitea.example.com/user/settings/applications
     3.2追加 Manage OAuth2 Applications
           Drone(4) Centos docker 部署 drone_第1张图片
           Drone(4) Centos docker 部署 drone_第2张图片
     3.3  作成 DRONE_RPC_SECRET
openssl rand -hex 16

     3.4ポートマッピング
  --publish=10080:80 \
  --publish=10443:443 \

 
4.実行後コマンドで表示

 
下一篇:Drone(3)Centos docker配備mysql/gitea
概要: 継続リリース-Drone CI/CD統合