initial commit

This commit is contained in:
2023-12-24 18:54:49 +00:00
commit 34cca63376
31 changed files with 1112 additions and 0 deletions

20
drone/.env.example Normal file
View File

@@ -0,0 +1,20 @@
# DOMAIN_ROOT is the root domain that this service will register as with Traefik
DOMAIN_ROOT=domain.ltd
# HOST_IP is the address of the host machine
HOST_IP=192.168.0.69
# GITEA_CLIENT_ID is the client id for your oauth2 application
GITEA_CLIENT_ID=XXX
# GITEA_CLIENT_SECRET is the secret for your oauth2 application
GITEA_CLIENT_SECRET=gto_xxx
# GITEA_SERVER is the location of your gitea server
GITEA_SERVER=https://gitea
# DRONE_RPC_SECRET is the rpc secret for the drone server
DRONE_RPC_SECRET=xxx
# DRONE_USER is the username for the drone actions to run as
DRONE_USER=user

74
drone/docker-compose.yml Normal file
View File

@@ -0,0 +1,74 @@
version: "3.8"
services:
drone:
image: drone/drone:2
container_name: drone
labels:
- "traefik.http.services.drone.loadbalancer.server.port=80"
- "traefik.enable=true"
- "traefik.http.routers.drone.rule=Host(`drone.${DOMAIN_ROOT}`)"
- 'traefik.http.routers.drone.middlewares=authelia@docker'
environment:
- DRONE_GITEA_SERVER=https://gitea.${DOMAIN_ROOT}
- DRONE_GITEA_CLIENT_ID=${GITEA_CLIENT_ID}
- DRONE_GITEA_CLIENT_SECRET=${GITEA_CLIENT_SECRET}
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_SERVER_HOST=drone.${DOMAIN_ROOT}
- DRONE_SERVER_PROTO=https
- DRONE_USER_CREATE=username:${DRONE_USER},admin:true
- DOMAIN_ROOT=${DOMAIN_ROOT}
- HOST_IP=${HOST_IP}
volumes:
- drone_data:/data
- /var/run/docker.sock:/var/run/docker.sock
networks:
- home-proxy
extra_hosts:
- gitea.${DOMAIN_ROOT}:${HOST_IP}
- nuc.${DOMAIN_ROOT}:${HOST_IP}
- gitea-ssh.${DOMAIN_ROOT}:${HOST_IP}
runner:
image: drone/drone-runner-docker:1
environment:
- DRONE_RPC_PROTO=http
- DRONE_RPC_HOST=drone
- DRONE_RPC_SECRET=${DRONE_RPC_SECRET}
- DRONE_RUNNER_CAPACITY=2
- DRONE_RUNNER_NAME=runners
- HOST_IP=${HOST_IP}
# ports:
# - 3000:3000/tcp
depends_on:
- drone
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- home-proxy
extra_hosts:
- gitea.${DOMAIN_ROOT}:${HOST_IP}
- nuc.${DOMAIN_ROOT}:${HOST_IP}
- gitea-ssh.${DOMAIN_ROOT}:${HOST_IP}
volumes:
drone_data:
external: true
networks:
home-proxy:
external: true