From 6269134860ecfaca0e22d9cebec8215c118d3082 Mon Sep 17 00:00:00 2001 From: Axel Date: Wed, 2 Nov 2022 11:35:48 +0100 Subject: [PATCH] Adding drone composer --- .env.example | 12 ++++++++++++ .gitignore | 1 + docker-compose.yml | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore create mode 100644 docker-compose.yml diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..c3a8a36 --- /dev/null +++ b/.env.example @@ -0,0 +1,12 @@ +DRONE_HOST=drone.domain.com +DRONE_PROTO=https +DRONE_PORT=80 +DRONE_COOKIE_SECRET=84e7c1aca2c4825d +DRONE_TIMEZONE=Europe/London +DRONE_TLS_AUTOCERT=false +DRONE_RPC_SECRET=3d10100908a29d077dc + +GITEA_HOST=https://git.domain.com +GITEA_CLIENT_ID=d1dd196fd454 +GITEA_CLIENT_SECRET=thKCuaAN6yaOdMk99le + diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..36a1631 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,35 @@ +version: '3.7' + +services: + drone-server: + image: drone/drone:2 + ports: + - ${DRONE_PORT}:80 + restart: unless-stopped + volumes: + - /var/lib/drone:/data + environment: + - DRONE_GITEA_SERVER=${GITEA_HOST} + - DRONE_GITEA_CLIENT_ID=${GITEA_CLIENT_ID} + - DRONE_GITEA_CLIENT_SECRET=${GITEA_CLIENT_SECRET} + - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} + - DRONE_SERVER_HOST=${DRONE_HOST} + - DRONE_SERVER_PROTO=${DRONE_PROTO} + - DRONE_TLS_AUTOCERT=${DRONE_TLS_AUTOCERT} + - DRONE_USER_CREATE=username:axel,admin:true + - DRONE_COOKIE_SECRET=${DRONE_COOKIE_SECRET} + - DRONE_COOKIE_TIMEOUT=72h + - TZ=${DRONE_TIMEZONE} + + drone-runner: + image: drone/drone-runner-docker:1 + ports: + - 3000:3000 + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - DRONE_RPC_PROTO=${DRONE_PROTO} + - DRONE_RPC_HOST=${DRONE_HOST} + - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} + - DRONE_RUNNER_CAPACITY=3