commit def4c41d595b4bccf6ae4a59f29f7c8ee24cdc45 Author: Steph Date: Fri Feb 5 15:43:56 2021 +0100 🎉 First commit! diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..d1a935c --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +DOMAIN=example.com +SECRET=somelongstring + +GITEA_DOMAIN=git.example.com +GITEA_CLIENT_ID=somelongstring +GITEA_CLIENT_SECRET="somelongbase64string" + +RUNNER_COUNT=4 +RUNNER_NAME=Actions +# Do not add a space in the runner name or you'll be debugging sentry for +# like an whole hour questioning what you're doing with your life. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..161341f --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +mnt/ +.env diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7c89f90 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3" + +services: + drone: + image: drone/drone:1 + volumes: + - ./mnt/drone:/data + environment: + - "VIRTUAL_HOST=${DOMAIN}" + - "LETSENCRYPT_HOST=${DOMAIN}" + - "DRONE_GITEA_CLIENT_ID=${GITEA_CLIENT_ID}" + - "DRONE_GITEA_CLIENT_SECRET=${GITEA_CLIENT_SECRET}" + - "DRONE_GITEA_SERVER=https://${GITEA_DOMAIN}" + - "DRONE_GIT_ALWAYS_AUTH=true" + - "DRONE_RPC_SECRET=${SECRET}" + - "DRONE_SERVER_HOST=${DOMAIN}" + - "DRONE_SERVER_PROTO=https" + networks: + - default + - 10000-nginx-proxy_nginx-proxy + + runner: + image: drone/drone-runner-docker:1 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - "DRONE_RPC_PROTO=http" + - "DRONE_RPC_HOST=drone" + - "DRONE_RPC_SECRET=${SECRET}" + - "DRONE_RUNNER_CAPACITY=${RUNNER_COUNT}" + - "DRONE_RUNNER_NAME=${RUNNER_NAME}" + ports: + - 3000:3000 + +networks: + 10000-nginx-proxy_nginx-proxy: + external: true