From e4ab1c7fdd7221403d6dbf8200a08957819113f3 Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Sun, 10 May 2020 21:36:23 +0100 Subject: [PATCH] . --- docker-compose.yml | 83 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 59 insertions(+), 24 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c6dad36..4b671d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,39 +1,74 @@ version: "3.7" services: - gitea: + drone-server: + # drone server application deploy: placement: constraints: [node.labels.com.sigyl.git-stack == yes] replicas: 1 restart_policy: condition: any - image: ${LOCAL_DOCKER_REGISTRY}gitea - environment: - - USER_UID=1000 - - USER_GID=1000 - - ROOT_URL=https://${GIT_DOMAIN}/git - - SSH_DOMAIN=${GIT_DOMAIN} - - GITEA_APP_NAME=${GITEA_APP_NAME} - - GIT_DOMAIN=${GIT_DOMAIN} - - GITEA_SERVER_LFS_JWT_SECRET=$GITEA_SERVER_LFS_JWT_SECRET - - GITEA_SECURITY_SECRET_KEY=$GITEA_SECURITY_SECRET_KEY - - GITEA_SECURITY_INTERNAL_TOKEN=$GITEA_SECURITY_INTERNAL_TOKEN - - GITEA_OAUTH2_JWT_SECRET=$GITEA_OAUTH2_JWT_SECRET - - GITEA_MAILER_HOST=$GITEA_MAILER_HOST - - GITEA_MAILER_USER=$GITEA_MAILER_USER - - GITEA_MAILER_FROM=$GITEA_MAILER_FROM - - GITEA_MAILER_PASSWD=$GITEA_MAILER_PASSWD - + image: drone/drone:1.7.0 volumes: - - gitea-app:/data - ports: - - 3000:3000 - - 22:22 + - drone:/var/lib/drone + - drone-data:/data + environment: + - DRONE_LOGS_DEBUG=true + - DRONE_LOGS_PRETTY=true + - DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} + - DRONE_GITEA_CLIENT_ID=${DRONE_GITEA_CLIENT_ID} + - DRONE_GITEA_CLIENT_SECRET=${DRONE_GITEA_CLIENT_SECRET} + - DRONE_SERVER_HOST=${DRONE_SERVER_HOST} # tunnel hostname + - DRONE_ADMIN=giles + - DRONE_SERVER_PROTO=https # tunnel adds https on top + - DRONE_SERVER_PORT=:8080 + - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} + - DRONE_USER_CREATE=username:giles,admin:true + - DRONE_AGENTS_ENABLED=true + - DRONE_CONVERT_PLUGIN_ENDPOINT=http://drone-starlark:3000 + - DRONE_CONVERT_PLUGIN_SECRET=${DRONE_CONVERT_SECRET} networks: - appnet - externalnet + drone-docker-runner: + # drone runner performs builds + deploy: + placement: + constraints: [node.labels.com.sigyl.git-stack == yes] + replicas: 1 + restart_policy: + condition: any + image: drone/drone-runner-docker:1 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + environment: + - DRONE_RPC_PROTO=http + - DRONE_RPC_HOST=drone-server:8080 + - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} + - DRONE_RUNNER_CAPACITY=8 + - DRONE_RUNNER_NAME="docker-runner" + networks: + - appnet + drone-starlark: + # drone starlark server converts starlark to yaml + deploy: + placement: + constraints: [node.labels.com.sigyl.git-stack == yes] + replicas: 1 + restart_policy: + condition: any + image: ${LOCAL_DOCKER_REGISTRY}drone-starlark + environment: + - DRONE_DEBUG=true + - DRONE_SECRET=${DRONE_CONVERT_SECRET} + - DRONE_STARLARK_REPO_PATHS=this:/repos + - SIGYL_STACK_NAME=$SIGYL_STACK_NAME + - SIGYL_STACK_ROOT=$SIGYL_STACK_ROOT + networks: + - appnet volumes: - gitea-app: + drone: + drone-data: networks: appnet: @@ -41,4 +76,4 @@ networks: #external: true externalnet: driver: overlay - external: true + external: true \ No newline at end of file