config-scripts/drone/docker-compose.yml

56 lines
1.8 KiB
YAML

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