docker
This commit is contained in:
22
drone/.env
Normal file
22
drone/.env
Normal file
@@ -0,0 +1,22 @@
|
||||
# ----------------------------------------
|
||||
# Gitea 域名配置
|
||||
GITEA_DOMAIN=git.gopher.ink
|
||||
# Gitea OAuth ClientID / Secret
|
||||
# 稍后配置 Gitea 后替换即可
|
||||
DRONE_GITEA_CLIENT_ID=af8fe56b-75c0-4215-8edd-f8a0f612dbdf
|
||||
DRONE_GITEA_CLIENT_SECRET=3ZCwjGUBignNcfd7bo57ObYtQr3aghb2e4RoGP6KZ8EH
|
||||
# drone 域名
|
||||
DRONE_DOMAIN=drone.oneisall.xyz
|
||||
# Drone 服务端和 Runner 之间通讯秘钥
|
||||
DRONE_RPC_SECRET=YOUR_RANDOM_KEY
|
||||
# Drone 超级管理员账号,根据自己需求修改
|
||||
DRONE_ADMIN_USERNAME=git
|
||||
|
||||
# ---------------------------------------
|
||||
# Drone 服务配置域名
|
||||
DRONE_SERVER_DOMAIN=drone.oneisall.xyz
|
||||
# Drone 服务端和 Runner 之间通讯秘钥
|
||||
DRONE_RPC_SECRET=YOUR_RANDOM_KEY
|
||||
# Runner 最大并发数量,根据自己需求来
|
||||
DRONE_RUNNER_CAPACITY=2
|
||||
|
||||
66
drone/docker-compose.yml
Normal file
66
drone/docker-compose.yml
Normal file
@@ -0,0 +1,66 @@
|
||||
version: "3"
|
||||
services:
|
||||
drone:
|
||||
image: drone/drone:latest
|
||||
container_name: drone
|
||||
networks:
|
||||
- traefik
|
||||
# ports:
|
||||
# - "44480:80"
|
||||
# - "44443:443"
|
||||
environment:
|
||||
- DRONE_GITEA_SERVER=http://${GITEA_DOMAIN}
|
||||
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
|
||||
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
|
||||
# - DRONE_GITHUB=true
|
||||
# - DRONE_GITHUB_URL=https://github.com
|
||||
# - DRONE_GITHUB_CLIENT=到GitHub获取
|
||||
# - DRONE_GITHUB_SECRET=到GitHub获取
|
||||
# - DRONE_GITHUB_SCOPE=repo,repo:status,user:email,read:org
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_SERVER_HOST=${DRONE_DOMAIN}
|
||||
- DRONE_SERVER_PROTO=https
|
||||
- DRONE_CLEANUP_INTERVAL=60m
|
||||
- DRONE_CLEANUP_DISABLED=false
|
||||
- DRONE_CLEANUP_DEADLINE_RUNNING=1h
|
||||
- DRONE_CLEANUP_DEADLINE_PENDING=2h
|
||||
- DRONE_USER_CREATE=username:${DRONE_ADMIN_USERNAME},admin:true
|
||||
restart: always
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik"
|
||||
- "traefik.http.routers.drone.entrypoints=websecure"
|
||||
- "traefik.http.routers.drone.rule=Host(`drone.oneisall.xyz`)"
|
||||
volumes:
|
||||
- ./drone:/data
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
# - /etc/docker/:/etc/docker
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10m"
|
||||
runner:
|
||||
image: drone/drone-runner-docker:latest
|
||||
container_name: drone_runner
|
||||
restart: always
|
||||
networks:
|
||||
- traefik
|
||||
expose:
|
||||
- 3000
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
- DRONE_RPC_PROTO=https
|
||||
- DRONE_RPC_HOST=${DRONE_SERVER_DOMAIN}
|
||||
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
|
||||
- DRONE_RUNNER_CAPACITY=${DRONE_RUNNER_CAPACITY}
|
||||
- DRONE_RUNNER_NAME=DRONE-RUNNER
|
||||
- DRONE_RUNNER_PRIVILEGED_IMAGES=plugins/docker,plugin/ecr,thegeeklab/drone-docker-buildx
|
||||
depends_on:
|
||||
- drone
|
||||
privileged: true
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
|
||||
BIN
drone/drone/database.sqlite
Normal file
BIN
drone/drone/database.sqlite
Normal file
Binary file not shown.
1
traefik-template
Submodule
1
traefik-template
Submodule
Submodule traefik-template added at e2a071ed24
Reference in New Issue
Block a user