diff --git a/apps/drone/Makefile b/apps/drone/Makefile index 080ec97..8326133 100644 --- a/apps/drone/Makefile +++ b/apps/drone/Makefile @@ -14,6 +14,7 @@ DRONE_DB_PASS ?= $(shell < /dev/urandom tr -dc A-Za-z0-9 2>/dev/null | head DRONE_VER ?= $(DRONE_VER0) DRONE_RUNNER_VER ?= 1.7.0 DRONE_SHARED_KEY ?= $(shell openssl rand -hex 16; echo) +DRONE_COPLA_KEY ?= $(shell openssl rand -hex 16; echo) DRONE_VAR_PATH ?= $(PWD)/$(DCAPE_VAR) define CONFIG_DRONE @@ -42,6 +43,8 @@ DRONE_DB_PASS=$(DRONE_DB_PASS) DRONE_SHARED_KEY=$(DRONE_SHARED_KEY) # Deployment persistent storage, absolute DRONE_VAR_PATH=$(DRONE_VAR_PATH) +# Drone conversion for platform tag (drocopla) key +DRONE_COPLA_KEY=$(DRONE_COPLA_KEY) # drone/drone docker image version DRONE_VER=$(DRONE_VER) diff --git a/apps/drone/docker-compose.inc.yml b/apps/drone/docker-compose.inc.yml index 6d0951f..042c997 100644 --- a/apps/drone/docker-compose.inc.yml +++ b/apps/drone/docker-compose.inc.yml @@ -4,12 +4,13 @@ restart: always depends_on: - drone-rd + - drone-copla labels: - "dcape.traefik.tag=${DCAPE_TAG}" - "traefik.enable=true" - "traefik.http.routers.drone.rule=Host(`${DRONE_HOST}`)" environment: - - DRONE_OPEN=true + - DRONE_OPEN=false - DRONE_SERVER_HOST=${DRONE_HOST} - DRONE_SERVER_PROTO=${DCAPE_SCHEME} - DRONE_TLS_AUTOCERT=false @@ -23,6 +24,9 @@ - DRONE_USER_CREATE=username:${DRONE_ADMIN},admin:true - DRONE_DATABASE_DRIVER=postgres - DRONE_DATABASE_DATASOURCE=postgresql://${DRONE_DB_TAG}:${DRONE_DB_PASS}@db:5432/${DRONE_DB_TAG}?sslmode=disable + + - DRONE_CONVERT_PLUGIN_ENDPOINT=http://drone-copla:3000 + - DRONE_CONVERT_PLUGIN_SECRET=${DRONE_COPLA_KEY} volumes: - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro @@ -34,8 +38,9 @@ restart: always environment: - DRONE_LIMIT_TRUSTED=false - - DRONE_RPC_PROTO=${DCAPE_SCHEME} - - DRONE_RPC_HOST=${DRONE_HOST} + - DRONE_PLUGIN_PULL=true + - DRONE_RPC_PROTO=http + - DRONE_RPC_HOST=drone - DRONE_RPC_SECRET=${DRONE_SHARED_KEY} - DRONE_RUNNER_CAPACITY=2 - DRONE_RUNNER_NAME=${HOSTNAME} @@ -46,3 +51,12 @@ - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro - /var/run/docker.sock:/var/run/docker.sock + + drone-copla: + image: ghcr.io/dopos/drocopla:v0.1.0 + restart: always + environment: + - DRONE_SECRET=${DRONE_COPLA_KEY} + volumes: + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro