From 79ad35c3a2e3aa0109e8b09df1ab71c69c6a97a6 Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Wed, 21 Oct 2020 12:01:04 +0100 Subject: [PATCH] . --- .drone/drone-home.jsonnet | 1 + .drone/drone-home.yml | 10 ++++++++++ docker-compose.yml | 6 +++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.drone/drone-home.jsonnet b/.drone/drone-home.jsonnet index 189dd3d..5fa1e40 100644 --- a/.drone/drone-home.jsonnet +++ b/.drone/drone-home.jsonnet @@ -37,6 +37,7 @@ local config = { 'REGISTRY_DOMAIN', 'REGISTRY_PORT', 'REGISTRY_PASSWORD', + 'SCHEME', ], publicSecrets, secretSecrets, diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 4bab7b0..b4e7a76 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -90,6 +90,7 @@ steps: - registry_domain - registry_port - registry_password + - scheme - domain - drone_gitea_client_id - drone_gitea_server @@ -105,6 +106,7 @@ steps: - "echo \"export REGISTRY_DOMAIN='$${REGISTRY_DOMAIN}'\" >> env-drone # \"registry-domain\"" - "echo \"export REGISTRY_PORT='$${REGISTRY_PORT}'\" >> env-drone # \"registry-port\"" - "echo \"export REGISTRY_PASSWORD='$${REGISTRY_PASSWORD}'\" >> env-drone # \"registry-password\"" + - "echo \"export SCHEME='$${SCHEME}'\" >> env-drone # \"scheme\"" - "echo \"export DOMAIN='$${DOMAIN}'\" >> env-drone # \"domain\"" - "echo \"export DRONE_GITEA_CLIENT_ID='$${DRONE_GITEA_CLIENT_ID}'\" >> env-drone # \"drone-gitea-client-id\"" - "echo \"export DRONE_GITEA_SERVER='$${DRONE_GITEA_SERVER}'\" >> env-drone # \"drone-gitea-server\"" @@ -134,6 +136,8 @@ steps: from_secret: registry-password REGISTRY_PORT: from_secret: registry-port + SCHEME: + from_secret: scheme SSH_HOST: from_secret: ssh-host SSH_KEY: @@ -171,6 +175,8 @@ steps: from_secret: registry-password REGISTRY_PORT: from_secret: registry-port + SCHEME: + from_secret: scheme volumes: - name: dockersock path: /var/run @@ -197,6 +203,7 @@ steps: - registry_domain - registry_port - registry_password + - scheme script: - export DRONE_GITEA_CLIENT_SECRET=$${DRONE_GITEA_CLIENT_SECRET} - export DRONE_RPC_SECRET=$${DRONE_RPC_SECRET} @@ -211,6 +218,7 @@ steps: - export REGISTRY_DOMAIN=$${REGISTRY_DOMAIN} - export REGISTRY_PORT=$${REGISTRY_PORT} - export REGISTRY_PASSWORD=$${REGISTRY_PASSWORD} + - export SCHEME=$${SCHEME} - set -e - cd /stack/drone - sh .drone/login.sh @@ -235,6 +243,8 @@ steps: from_secret: registry-password REGISTRY_PORT: from_secret: registry-port + SCHEME: + from_secret: scheme SSH_HOST: from_secret: ssh-host SSH_KEY: diff --git a/docker-compose.yml b/docker-compose.yml index 3cb708e..3910108 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,12 +15,12 @@ services: environment: - DRONE_LOGS_DEBUG=true - DRONE_LOGS_PRETTY=true - - DRONE_GITEA_SERVER=${DRONE_GITEA_SERVER} + - DRONE_GITEA_SERVER=${SCHEME}://${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_PROTO=${SCHEME} # tunnel adds https on top - DRONE_SERVER_PORT=:8080 - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} - DRONE_USER_CREATE=username:giles,admin:true @@ -46,7 +46,7 @@ services: - DRONE_RPC_SECRET=${DRONE_RPC_SECRET} - DRONE_RUNNER_CAPACITY=8 - DRONE_RUNNER_NAME="docker-runner" - - DRONE_RUNNER_ENVIRON=DOMAIN:$DOMAIN,REGISTRY_DOMAIN:$REGISTRY_DOMAIN,REGISTRY_PORT:$REGISTRY_PORT,REGISTRY_PASSWORD:$REGISTRY_PASSWORD,SSH_HOST:$SSH_HOST,SSH_PORT:$SSH_PORT,SSH_USERNAME:$SSH_USERNAME,SSH_KEY:$SSH_KEY + - DRONE_RUNNER_ENVIRON=SCHEME:$SCHEME,DOMAIN:$DOMAIN,REGISTRY_DOMAIN:$REGISTRY_DOMAIN,REGISTRY_PORT:$REGISTRY_PORT,REGISTRY_PASSWORD:$REGISTRY_PASSWORD,SSH_HOST:$SSH_HOST,SSH_PORT:$SSH_PORT,SSH_USERNAME:$SSH_USERNAME,SSH_KEY:$SSH_KEY networks: - appnet volumes: