add maintainer info, some documentation and healthcheck #17

Merged
stevensting merged 2 commits from maintainer into main 2026-04-08 12:37:46 +00:00
4 changed files with 62 additions and 37 deletions
+17
View File
@@ -0,0 +1,17 @@
---
name: "Parasol static site pull request template"
about: "Parasol static site request template"
---
<!--
Thank you for doing recipe maintenance work!
Please mark all checklist items which are relevant for your changes.
Please remove the checklist items which are not relevant for your changes.
Feel free to remove this comment.
-->
* [ ] I have deployed and tested my changes
* [ ] I have [updated relevant versions in `abra.sh`](https://docs.coopcloud.tech/maintainers/upgrade/#updating-versions-in-the-abrash)
* [ ] I have made my environment variable changes [backwards compatible](https://docs.coopcloud.tech/maintainers/upgrade/#backwards-compatible-environment-variable-changes)
* [ ] I ran `abra recipe lint parasol-static-site --chaos` on the PR's branch and fixed the warnings.
* [ ] I have added a [release note entry](https://docs.coopcloud.tech/maintainers/upgrade/#creating-new-release-notes)
+35 -36
View File
@@ -1,15 +1,22 @@
# Parasol Static Site :open_umbrella: :spider_web:
[![Build Status](https://build.coopcloud.tech/api/badges/coop-cloud/parasol-static-site/status.svg)](https://build.coopcloud.tech/coop-cloud/parasol-static-site)
A recipe for generating static websites with [Hugo](https://gohugo.io) and a listener service which triggers git pulls and builds via [webhookd](https://github.com/ncarlier/webhookd)
<!-- metadata -->
* **Maintainer**: [@stevensting](https://git.coopcloud.tech/stevensting)
* **Category**: Development
* **Status**: 0, dev
* **Image**: [site-badger](https://codeberg.org/eotl/site-badger)
* **Healthcheck**: {{ .Healthcheck }}
* **Backups**: No
* **Email**: No
* **Status**: 3, stable
* **Image**: [site-badger](https://git.coopcloud.tech/toolshed/site-badger)
* **Healthcheck**: yes
* **Backups**: not necessary
* **Email**: not necessary
* **Tests**: No
* **SSO**: No
* **SSO**: not necessary
<!-- endmetadata -->
## Quick start
@@ -17,13 +24,11 @@ A recipe for generating static websites with [Hugo](https://gohugo.io) and a lis
* `abra app config <app-site-name>`
* `abra app deploy <app-site-name>`
This will deploys a public website built from a Hugo site stored in a **public
git repository.** If you need various private modes, there are four different
deployment scenarios supported:
This will deploy a **public website** built from a Hugo site stored in a **git repository.** If you need various private modes, there are different deployment options supported:
- Public Site & Public Repo
- HTTP Basic Auth & Public Repo
- Public Site & Private Repo
- Public Git Repo
- Private Git Repo with deploy key
- /deploy endpoint protected with HTTP Basic Auth
- HTTP Basic Auth & Private Repo
### Public Site & Public Repo
@@ -31,12 +36,12 @@ deployment scenarios supported:
The default deployment is a **fully public** site and **public git repository.**
* `/`: the Hugo site is served
* `/deploy`: triggers `webhookd` to re-build the site, **includes publicly viewable build logs**
* `/deploy`: triggers `webhookd` to re-build the site, includes publicly viewable build logs. ⚠️ **Be aware that misuse could lead to constant CPU usage on your server, as /deploy is not rate limited. This mode is not recommended**
### HTTP Basic Auth
### Use HTTP Basic Auth for `/deploy` endpoint
To enable a password protected site built from a public git repo, uncomment the
To enable a password protected /deploy endpoint, uncomment the
following lines in your `.env` file:
```
@@ -48,13 +53,19 @@ SECRET_AUTH_PASSWORD_VERSION=v1
Then run `abra app secret generate -a <domain>` command.
When you deploy:
### Use automatic deployment with your GIT instance
* `/`: the Hugo site is served
* `/deploy`: the webhook is behind HTTP Basic Auth
Depending on which git platform you use, adding the auth information might be a little different. This is how it works with Forgejo/Codeberg.
Generate a bas64 coded token for the protected endpoint:
```
echo -n '<username>:<SECRET_AUTH_PASSWORD>' | base64
```
Create a webhook which triggers the endpoint <your-domain>/deploy on push events for your git branch and add the following to the field authentication header:
```
Basic <bas64-coded-token>
```
### Private Repository
### Us a Private Repository
If you enable the following lines in your `.env` file:
@@ -67,18 +78,16 @@ SECRET_DEPLOY_KEY_VERSION=v1
Then you need to generate a SSH key:
```
$ ssh-keygen -a 100 -t ed25519
$ ssh-keygen -a 100 -t ed25519 -C <domainname>
```
Then, insert the secret:
```
$ abra secret insert <domain> deploy_key v1 -f -t <ssh-private-key-file>
$ abra secret insert <domain> deploy_key v1 -f -t <path-to/ssh-private-key-file>
```
You now need to upload the Public SSH key to the Git repository settings
as a `Deploy Key` at which forge website you use. This is usually
located in some web UI flow like:
You now need to upload the Public SSH key to the Git repository settings as a `Deploy Key` at the forge website you use. This is usually located in some web UI flow like:
```
Repository -> Settings > Deploy keys
@@ -95,22 +104,12 @@ https://codeberg.org/user/website-repo/settings/keys
```
You can then deploy the abra recipe and the deploy key will be loaded before cloning the
private repository and all should nicely.
private repository and all should work nicely.
```
$ abra app deploy example.org
```
### HTTP Basic Auth & Private Repository
You need to edit the `COMPOSE_FILE=` line to include the following `.yml` files:
```
COMPOSE_FILE="compose.yml:compose.auth.yml:compose.private.yml"
```
## Usage
To trigger the deploy webhook with normal HTTP request
+6
View File
@@ -27,6 +27,12 @@ services:
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
- "coop-cloud.${STACK_NAME}.version=v0.6.0+1.29.7-alpine"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
timeout: 10s
retries: 30
start_period: 30s
badger:
image: git.coopcloud.tech/toolshed/site-badger:0.3.0
+4 -1
View File
@@ -2,5 +2,8 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended"
],
"reviewers": [
"stevensting"
]
}
}