1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Docker] [drone] Drone基本安裝

Last updated at Posted at 2020-05-14

#目的
這是一次安裝經驗紀錄,當我們需要自己架設 CICD 環境時,我們挑選了Drone作為本次的安裝的對象

但因為他登入採用版本控款的第三方登入所以也需要搭配一個版本控管環境,我們就以Gitlab為例

預先準備環境:Docker

#安裝Drone

1.設定Gitlab Application
callbackurl 依照你得drone版本不同可能要更改 新版的是用 /login , 舊版本可能要用 /authorize
drone1.png

2 . 安裝Drone

 docker run \
  --volume=/var/lib/drone:/data \
  --env=DRONE_GITLAB_SERVER=http://192.168.10.2:8888 \ 
  --env=DRONE_GITLAB_CLIENT_ID=fdfdfvbfbfgfdgfdgfdbvdfbfdgfdgdfgfdgfd \ 
  --env=DRONE_GITLAB_CLIENT_SECRET=dfdfdfdfdfdfdfdfdfdfdfdfdfdfdfdffd \ 
  --env=DRONE_RPC_SECRET=54E921B198DA2BB4E4F9366F7F4AB \  
  --env=DRONE_SERVER_HOST=192.168.10.2:9999 \ 
  --env=DRONE_SERVER_PROTO=http  \  
  --publish=9999:80 \   
  --publish=9998:443 \  
  --restart=always \
  --detach=true \
  --name=drone \
  drone/drone:1
  • DRONE_GITLAB_SERVER 是你對應Gitlab的網址,我是架設在內網,依照你的版本控管位置設定
  • DRONE_GITLAB_CLIENT_ID 這個在Gitlab UserSettings/Application 中產生
  • DRONE_GITLAB_CLIENT_SECRET 這個在Gitlab UserSettings/Application 中產生
  • DRONE_SERVER_HOST drone 安裝位置的url
  • DRONE_SERVER_PROTO依照drone使用http還是https
  • 9999(外部監聽Port):80(Docker 內部對應Port)
  • 9998(外部監聽Port):443(Docker 內部對應Port)

3.登入drone

drone2.png

這樣就完成了,之後有空再補上drone 使用方式

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?