First push from proxy (docker host) to gitea

This commit is contained in:
root 2023-05-08 16:35:25 +00:00
commit a69fa8cc56
25 changed files with 781 additions and 0 deletions

3
drone/.env Normal file
View file

@ -0,0 +1,3 @@
DRONE_GITEA_CLIENT_ID=0e1dc5a7-e7c6-49a9-bfb6-0788b841cd80
DRONE_GITEA_CLIENT_SECRET=gto_zpobgtdlqcfeha7not3qezm2yccfpahvrxpmu2smsj5gzxyepcna
DRONE_RPC_SECRET=5d92181e9ce8ec5574a28b09d8f185d7

56
drone/docker-compose.yml Normal file
View file

@ -0,0 +1,56 @@
version: '3'
services:
ci:
image: drone/drone:latest
container_name: drone
hostname: ci
volumes:
- /root/drone/data:/data
environment:
- DRONE_GITEA_SERVER=https://git.office.kh3group.com
- DRONE_GIT_ALWAYS_AUTH=true
- DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET}
- DRONE_SERVER_HOST=drone.office.kh3group.com
- DRONE_SERVER_PROTO=https
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_USER_CREATE=username:support,admin:true
restart: unless-stopped
labels:
- "traefik.http.routers.drone.entrypoints=http"
- "traefik.http.routers.drone.rule=Host(`drone.office.kh3group.com`)"
- "traefik.http.middlewares.drone-https-redirect.redirectscheme.scheme=https"
- "traefik.http.routers.drone.middlewares=drone-https-redirect"
- "traefik.enable=true"
- "traefik.http.routers.drone-secure.entrypoints=https"
- "traefik.http.routers.drone-secure.rule=Host(`drone.office.kh3group.com`) || Host(`drone.kh3group.com`)"
- "traefik.http.routers.drone-secure.tls=true"
- "traefik.http.routers.drone-secure.service=drone"
- "traefik.http.services.drone.loadbalancer.server.port=80"
- "traefik.docker.network=proxy"
networks:
- proxy
- backend
ci-agent:
image: drone/drone-runner-docker:1
container_name: drone-runner
hostname: ci-agent
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_RPC_PROTO=https
- DRONE_RPC_HOST=drone.office.kh3group.com
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=droner1
restart: unless-stopped
networks:
- backend
networks:
proxy:
external: true
backend:
external: true