From dea4dfea5a47689fb289cd154d8f2dbf393f2ac1 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Sun, 25 Jul 2021 17:11:18 +0200 Subject: [PATCH] Support Golang templating --- .drone.yml | 9 ++++----- .env.sample | 7 ++++--- .gitea/template | 3 --- .gitignore | 2 +- README.md | 26 ++++++++++++++------------ 5 files changed, 23 insertions(+), 24 deletions(-) delete mode 100644 .gitea/template diff --git a/.drone.yml b/.drone.yml index fd01a32..0b0ad43 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,13 +6,12 @@ steps: image: decentral1se/stack-ssh-deploy:latest settings: host: swarm-test.autonomic.zone - stack: ${REPO_NAME_SNAKE} + stack: {{ .Name }} purge: true deploy_key: from_secret: drone_ssh_swarm_test environment: - DOMAIN: ${REPO_NAME_KEBAB}.swarm-test.autonomic.zone - STACK_NAME: ${REPO_NAME_SNAKE} + DOMAIN: {{ .Name }}.swarm-test.autonomic.zone LETS_ENCRYPT_ENV: production - name: notify coopcloud-dev on failure @@ -39,7 +38,7 @@ steps: - name: release a new version image: decentral1se/drone-abra:latest settings: - command: recipe ${REPO_NAME} release + command: recipe {{ .Name }} release deploy_key: from_secret: abra_bot_deploy_key @@ -53,4 +52,4 @@ steps: repositories: - coop-cloud/auto-apps-json depends_on: - - release a new version \ No newline at end of file + - release a new version diff --git a/.env.sample b/.env.sample index ef7db8d..be72118 100644 --- a/.env.sample +++ b/.env.sample @@ -1,6 +1,7 @@ -TYPE=${REPO_NAME_KEBAB} +TYPE={{ .Name }} + +DOMAIN={{ .Name }}.example.com -DOMAIN=${REPO_NAME_KEBAB}.example.com ## Domain aliases -#EXTRA_DOMAINS=', `www.${REPO_NAME_KEBAB}.example.com`' +#EXTRA_DOMAINS=', `www.{{ .Name }}.example.com`' LETS_ENCRYPT_ENV=production diff --git a/.gitea/template b/.gitea/template deleted file mode 100644 index 9d0f443..0000000 --- a/.gitea/template +++ /dev/null @@ -1,3 +0,0 @@ -README.md -.env.sample -.drone.yml \ No newline at end of file diff --git a/.gitignore b/.gitignore index 37b52cc..7a6353d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/.envrc +.envrc diff --git a/README.md b/README.md index a673da8..7c24e45 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ -# ${REPO_NAME_TITLE} +# {{ .Name }} -${REPO_DESCRIPTION} +{{ .Description }} -* **Category**: -* **Status**: -* **Image**: [`${REPO_NAME}`](https://hub.docker.com/r/${REPO_NAME}/${REPO_NAME}) -* **Healthcheck**: -* **Backups**: -* **Email**: -* **Tests**: -* **SSO**: + +- **Category**: +- **Status**: +- **Image**: +- **Healthcheck**: +- **Backups**: +- **Email**: +- **Tests**: +- **SSO**: + ## Basic usage @@ -24,5 +26,5 @@ ${REPO_DESCRIPTION} 5. `abra app YOURAPPDOMAIN deploy` 6. Open the configured domain in your browser to finish set-up -[`abra`]: https://git.autonomic.zone/autonomic-cooperative/abra -[`coop-cloud/traefik`]: https://git.autonomic.zone/coop-cloud/traefik +[`abra`]: https://git.coopcloud.tech/coop-cloud/abra +[`coop-cloud/traefik`]: https://git.coopcloud.tech/coop-cloud/traefik