Skip to content

Commit

Permalink
add drocopla for non-amd64 drone runners
Browse files Browse the repository at this point in the history
  • Loading branch information
LeKovr committed Nov 27, 2021
1 parent 8cefbe8 commit a3eccbe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
3 changes: 3 additions & 0 deletions apps/drone/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
20 changes: 17 additions & 3 deletions apps/drone/docker-compose.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}
Expand All @@ -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

0 comments on commit a3eccbe

Please sign in to comment.