From 313677fcf2cd88b2ea59fdca7ec552db50653a21 Mon Sep 17 00:00:00 2001 From: David Boreham Date: Thu, 16 Mar 2023 12:27:23 -0600 Subject: [PATCH 1/3] Initial version --- drone/docker-compose.yml | 31 +++++++++++++++++++++++++++++++ drone/run-this-first.sh | 5 +++++ gitea/docker-compose.yml | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 drone/docker-compose.yml create mode 100755 drone/run-this-first.sh diff --git a/drone/docker-compose.yml b/drone/docker-compose.yml new file mode 100644 index 0000000..2a0a445 --- /dev/null +++ b/drone/docker-compose.yml @@ -0,0 +1,31 @@ +# Deploy drone CI system + +services: + drone: + image: drone/drone:2 + environment: + - DRONE_GITEE_CLIENT_ID=f7018cdd7c2a2515eb0cc3eeea039a3aeda0991a520c9e6f7eca37b97761de20 + - DRONE_GITEE_CLIENT_SECRET=a29f1465460f620d1238b6ebf207ae6778a6bfd074b3c7befe72d5f9647ed02c + - DRONE_RPC_SECRET=super-duper-secret + - DRONE_SERVER_HOST=gitea.local # TODO: make this more generic + - DRONE_SERVER_PROTO=http + restart: always + volumes: + - ./drone:/data + ports: + - 80 + - 443 + + drone-runner: + image: drone/drone-runner-docker:1 + environment: + - DRONE_RPC_PROTO=http + - DRONE_RPC_HOST=drone + - DRONE_RPC_SECRET=super-duper-secret + - DRONE_RUNNER_CAPACITY=2 + - DRONE_RUNNER_NAME=drone-runner-1 + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - 3000 diff --git a/drone/run-this-first.sh b/drone/run-this-first.sh new file mode 100755 index 0000000..8f4763c --- /dev/null +++ b/drone/run-this-first.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +if [[ -n "$CERC_SCRIPT_DEBUG" ]]; then + set -x +fi +mkdir -p ./drone diff --git a/gitea/docker-compose.yml b/gitea/docker-compose.yml index 1bace10..20502d4 100644 --- a/gitea/docker-compose.yml +++ b/gitea/docker-compose.yml @@ -1,5 +1,6 @@ version: "3" - +# TODO: remove version since it is now redundant +# remove this network definition unless there's a reason for it networks: gitea: external: false -- 2.45.2 From 758303acfdcae0a2d666c14df3b715292d33b63c Mon Sep 17 00:00:00 2001 From: David Boreham Date: Thu, 16 Mar 2023 12:28:58 -0600 Subject: [PATCH 2/3] Remove example creds --- drone/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drone/docker-compose.yml b/drone/docker-compose.yml index 2a0a445..ec92bcc 100644 --- a/drone/docker-compose.yml +++ b/drone/docker-compose.yml @@ -4,8 +4,8 @@ services: drone: image: drone/drone:2 environment: - - DRONE_GITEE_CLIENT_ID=f7018cdd7c2a2515eb0cc3eeea039a3aeda0991a520c9e6f7eca37b97761de20 - - DRONE_GITEE_CLIENT_SECRET=a29f1465460f620d1238b6ebf207ae6778a6bfd074b3c7befe72d5f9647ed02c + - DRONE_GITEE_CLIENT_ID=put_the_real_client_id_here + - DRONE_GITEE_CLIENT_SECRET=put_the_real_secret_here - DRONE_RPC_SECRET=super-duper-secret - DRONE_SERVER_HOST=gitea.local # TODO: make this more generic - DRONE_SERVER_PROTO=http -- 2.45.2 From 4256150ed49cfd6d09205daec09a6a9656697a9c Mon Sep 17 00:00:00 2001 From: David Boreham Date: Thu, 16 Mar 2023 12:42:49 -0600 Subject: [PATCH 3/3] Use gitea not gitee --- drone/docker-compose.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drone/docker-compose.yml b/drone/docker-compose.yml index ec92bcc..94eefe1 100644 --- a/drone/docker-compose.yml +++ b/drone/docker-compose.yml @@ -4,8 +4,9 @@ services: drone: image: drone/drone:2 environment: - - DRONE_GITEE_CLIENT_ID=put_the_real_client_id_here - - DRONE_GITEE_CLIENT_SECRET=put_the_real_secret_here + - DRONE_GITEA_SERVER=http://gitea.local + - DRONE_GITEA_CLIENT_ID=put_the_real_client_id_here + - DRONE_GITEA_CLIENT_SECRET=put_the_real_secret_here - DRONE_RPC_SECRET=super-duper-secret - DRONE_SERVER_HOST=gitea.local # TODO: make this more generic - DRONE_SERVER_PROTO=http -- 2.45.2