From 19006a61c5b6646025a2aa5f790494969e7c7ce0 Mon Sep 17 00:00:00 2001 From: Giles Bradshaw Date: Wed, 23 Sep 2020 08:20:38 +0100 Subject: [PATCH] fix: set gitea-domain --- .drone/drone-home.yml | 16 +--------------- .drone/package.json | 2 +- .drone/yarn.lock | 8 ++++---- docker-compose.yml | 3 +-- gitea/app.ini | 6 +++--- 5 files changed, 10 insertions(+), 25 deletions(-) diff --git a/.drone/drone-home.yml b/.drone/drone-home.yml index 1884f09..eb9adfc 100644 --- a/.drone/drone-home.yml +++ b/.drone/drone-home.yml @@ -43,12 +43,9 @@ steps: - gitea_security_internal_token - gitea_oauth2_jwt_secret - gitea_mailer_passwd - host: ${SSH_HOST} - key: ${SSH_KEY} - passphrase: ${SSH_PASSPHRASE} - port: ${SSH_PORT} script: - rm -f env-gitea + - echo $${DOMAIN} - "echo \"export GITEA_MAILER_HOST='$${GITEA_MAILER_HOST}'\" >> env-gitea # \"gitea-mailer-host\"" - "echo \"export GITEA_MAILER_FROM='$${GITEA_MAILER_FROM}'\" >> env-gitea # \"gitea-mailer-from\"" - "echo \"export GITEA_MAILER_USER='$${GITEA_MAILER_USER}'\" >> env-gitea # \"gitea-mailer-user\"" @@ -58,7 +55,6 @@ steps: - "echo \"export GITEA_SECURITY_INTERNAL_TOKEN='$${GITEA_SECURITY_INTERNAL_TOKEN}'\" >> env-gitea # \"gitea-security-internal-token\"" - "echo \"export GITEA_OAUTH2_JWT_SECRET='$${GITEA_OAUTH2_JWT_SECRET}'\" >> env-gitea # \"gitea-oauth2-jwt-secret\"" - "echo \"export GITEA_MAILER_PASSWD='$${GITEA_MAILER_PASSWD}'\" >> env-gitea # \"gitea-mailer-passwd\"" - username: ${SSH_USER} environment: GITEA_APP_NAME: from_secret: gitea-app-name @@ -83,14 +79,9 @@ steps: image: appleboy/drone-scp:1.6.2@sha256:bd37a55f4b97e7742b0de7333669b96220b3cc422d366e1fa8c34059b736ab47 settings: command_timeout: 2m - host: ${SSH_HOST} - key: ${SSH_KEY} - passphrase: ${SSH_PASSPHRASE} - port: ${SSH_PORT} source: - . target: /stack/gitea - username: ${SSH_USER} - name: wait image: alpine:3.12.0@sha256:90baa0922fe90624b05cb5766fa5da4e337921656c2f8e2b13bd3c052a0baac1 @@ -131,10 +122,6 @@ steps: - gitea_security_internal_token - gitea_oauth2_jwt_secret - gitea_mailer_passwd - host: ${SSH_HOST} - key: ${SSH_KEY} - passphrase: ${SSH_PASSPHRASE} - port: ${SSH_PORT} script: - export GITEA_SERVER_LFS_JWT_SECRET=$${GITEA_SERVER_LFS_JWT_SECRET} - export GITEA_SECURITY_SECRET_KEY=$${GITEA_SECURITY_SECRET_KEY} @@ -154,7 +141,6 @@ steps: - sh .drone/login.sh - sh .drone/pull.sh - sh .drone/deploy.sh - username: ${SSH_USER} environment: GITEA_APP_NAME: from_secret: gitea-app-name diff --git a/.drone/package.json b/.drone/package.json index 22cfdd2..33bc5f1 100644 --- a/.drone/package.json +++ b/.drone/package.json @@ -4,6 +4,6 @@ "build": "drone jsonnet --source drone-home.jsonnet --target drone-home.yml --stream" }, "dependencies": { - "@sigyl/jsonnet-drone": "^0.1.0" + "@sigyl/jsonnet-drone": "^0.1.1" } } diff --git a/.drone/yarn.lock b/.drone/yarn.lock index 44ab354..35ba3cd 100644 --- a/.drone/yarn.lock +++ b/.drone/yarn.lock @@ -12,10 +12,10 @@ resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone-environment/-/jsonnet-drone-environment-0.0.5.tgz#9ea85e08904777bd21a3e4b30b0b91461d0285ff" integrity sha512-xVGmdMO1pOyozAWUbJm6mzKBgsLPJ+1hWnGCK3AxPkr7kkDh18hu30+TLzlcQtqq76s5jUfvJUztezsGj/mIcw== -"@sigyl/jsonnet-drone@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.1.0.tgz#feda1797e8e9ef799cad72e65f7163ca26a9e3a5" - integrity sha512-QY/ngucxFOtLfL8Mt0f2bxN4fQDUOGOFtaRpSH2cNyg84xADkzehT0ORZtbLitr+AwhyF5KN/zAGvzkyNAoqPw== +"@sigyl/jsonnet-drone@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@sigyl/jsonnet-drone/-/jsonnet-drone-0.1.1.tgz#37afda650e8420a664e89c762236a1e59aa485d9" + integrity sha512-GR7LXYaUJYjkcWRyyLlwrBX9Jw04Vlcc/XS32rNaSz4wtrD9opvnmESxNC1UTWXsT/3ybuQhLhCboEb2GiTWmw== dependencies: "@sigyl/jsonnet-compose" "^0.0.2" "@sigyl/jsonnet-drone-environment" "0.0.5" diff --git a/docker-compose.yml b/docker-compose.yml index 813ac20..9b823a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,10 +11,9 @@ services: environment: - USER_UID=1000 - USER_GID=1000 - - ROOT_URL=https://${DOMAIN}/git - SSH_DOMAIN=${DOMAIN} - GITEA_APP_NAME=${GITEA_APP_NAME} - - GIT_DOMAIN=${DOMAIN} + - GITEA_DOMAIN=${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 diff --git a/gitea/app.ini b/gitea/app.ini index 78ec9f5..7cac1fe 100644 --- a/gitea/app.ini +++ b/gitea/app.ini @@ -17,13 +17,13 @@ TEMP_PATH = /data/gitea/uploads APP_DATA_PATH = /data/gitea SSH_DOMAIN = ${DOMAIN} HTTP_PORT = 3000 -ROOT_URL = https://${DOMAIN}/git/ +ROOT_URL = https://${GITEA_DOMAIN}/git/ DISABLE_SSH = false SSH_PORT = 22 SSH_LISTEN_PORT = 22 LFS_START_SERVER = true LFS_CONTENT_PATH = /data/git/lfs -DOMAIN = ${DOMAIN} +DOMAIN = ${GITEA_DOMAIN} LFS_JWT_SECRET = ${GITEA_SERVER_LFS_JWT_SECRET} OFFLINE_MODE = false @@ -74,7 +74,7 @@ ENABLE_CAPTCHA = false DEFAULT_KEEP_EMAIL_PRIVATE = false DEFAULT_ALLOW_CREATE_ORGANIZATION = true DEFAULT_ENABLE_TIMETRACKING = true -NO_REPLY_ADDRESS = noreply.${DOMAIN} +NO_REPLY_ADDRESS = noreply.${GITEA_DOMAIN} [oauth2] JWT_SECRET = ${GITEA_OAUTH2_JWT_SECRET}