add docs to repo
This commit is contained in:
parent
99c5a497f0
commit
5a6e51463a
12 changed files with 231 additions and 0 deletions
38
.woodpecker/deploy-docs.yml
Normal file
38
.woodpecker/deploy-docs.yml
Normal file
|
@ -0,0 +1,38 @@
|
|||
when:
|
||||
- event: push
|
||||
branch: main
|
||||
path:
|
||||
include:
|
||||
- 'docs/**'
|
||||
- '.woodpecker/deploy-docs.yml'
|
||||
ignore_message: '[ALL]'
|
||||
|
||||
steps:
|
||||
build:
|
||||
image: golang:1.22-bookworm
|
||||
environment:
|
||||
- HUGO_VERSION=0.128.1
|
||||
- TZ=Europe/Berlin
|
||||
|
||||
commands:
|
||||
- cd docs/
|
||||
- wget https://github.com/gohugoio/hugo/releases/download/v$${HUGO_VERSION}/hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && apt install ./hugo_extended_$${HUGO_VERSION}_linux-amd64.deb && rm -f hugo_extended_$${HUGO_VERSION}_linux-amd64.deb
|
||||
- hugo --minify --destination ./public
|
||||
|
||||
upload:
|
||||
image: alpine:latest
|
||||
secrets:
|
||||
- RSYNC_SSHKEY
|
||||
- RSYNC_TARGET_SERVER
|
||||
- RSYNC_TARGET_USER
|
||||
environment:
|
||||
- TARGET_PATH=/webroot/certwarden-deploy.adora.codes
|
||||
- RSYNC_TARGET_PORT=2003
|
||||
commands:
|
||||
- cd docs/
|
||||
- apk add --update --no-cache openssh rsync git
|
||||
- mkdir -p $HOME/.ssh
|
||||
- echo "$RSYNC_SSHKEY" > $HOME/.ssh/id_ed25519
|
||||
- chmod 0600 $HOME/.ssh/id_ed25519
|
||||
- ssh-keyscan -t ed25519 -p $RSYNC_TARGET_PORT $RSYNC_TARGET_SERVER >> $HOME/.ssh/known_hosts
|
||||
- rsync -avh -e "ssh -p $RSYNC_TARGET_PORT" --delete ./public/ $RSYNC_TARGET_USER@$RSYNC_TARGET_SERVER:$TARGET_PATH
|
13
docs/.gitignore
vendored
Normal file
13
docs/.gitignore
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Generated files by hugo
|
||||
/public/
|
||||
/resources/_gen/
|
||||
/assets/jsconfig.json
|
||||
hugo_stats.json
|
||||
|
||||
# Executable may be added to repository
|
||||
hugo.exe
|
||||
hugo.darwin
|
||||
hugo.linux
|
||||
|
||||
# Temporary lock file while building
|
||||
/.hugo_build.lock
|
9
docs/LICENSE
Normal file
9
docs/LICENSE
Normal file
|
@ -0,0 +1,9 @@
|
|||
MIT License
|
||||
|
||||
Copyright 2024 Adora Laura Kalb <dev@lauka.net>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
docs/README.md
Normal file
1
docs/README.md
Normal file
|
@ -0,0 +1 @@
|
|||
# certwarden-deploy Documentation
|
5
docs/archetypes/default.md
Normal file
5
docs/archetypes/default.md
Normal file
|
@ -0,0 +1,5 @@
|
|||
+++
|
||||
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
|
||||
date = {{ .Date }}
|
||||
draft = true
|
||||
+++
|
18
docs/config.toml
Normal file
18
docs/config.toml
Normal file
|
@ -0,0 +1,18 @@
|
|||
baseURL = 'https://certwarden-deploy.adora.codes/'
|
||||
languageCode = 'en-us'
|
||||
title = 'certwarden-deploy'
|
||||
|
||||
theme = "code.lila.network/adoralaura/hugo-book-theme"
|
||||
|
||||
|
||||
|
||||
[params]
|
||||
# (Optional, default light) Sets color theme: light, dark or auto.
|
||||
# Theme 'auto' switches between dark and light modes based on browser/os preferences
|
||||
BookTheme = 'auto'
|
||||
BookRepo = 'https://code.lila.network/adoralaura/certwarden-deploy'
|
||||
|
||||
|
||||
[module]
|
||||
[[module.imports]]
|
||||
path = "code.lila.network/adoralaura/hugo-book-theme"
|
89
docs/content/_index.md
Normal file
89
docs/content/_index.md
Normal file
|
@ -0,0 +1,89 @@
|
|||
---
|
||||
title: Introduction
|
||||
type: docs
|
||||
---
|
||||
|
||||
## CertWarden
|
||||
|
||||
[CertWarden](https://www.certwarden.com/) is a self-hosted Centralized ACME Certificate Management platform. With it you can manage and aquire Let's Encrypt certificates.
|
||||
|
||||
However, to deploy them to your hosts, for now there only was a docker client, and that was too bloated for me.
|
||||
|
||||
So I built `certwarden-deploy`, a dependency-less binary that can run via crontab/systemd timers and that can fetch new certificates and run actions after new certificates got rolled out.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Installation of the required CertWarden instance is out of scope of this documentation. For detailed instructions regarding CertWarden, please visit [it's documentation](https://www.certwarden.com/docs/introduction/)
|
||||
|
||||
|
||||
To quickly get started with `certwarden-deploy`, just download the binary...
|
||||
|
||||
```shell
|
||||
# this downloads certwarden-deploy version 0.1.1
|
||||
# to /usr/local/bin/certwarden-deploy
|
||||
sudo wget https://code.lila.network/adoralaura/certwarden-deploy/releases/download/0.1.1/certwarden-deploy-0.1.1-linux-amd64 -O /usr/local/bin/certwarden-deploy
|
||||
|
||||
sudo chmod +x /usr/local/bin/certwarden-deploy
|
||||
```
|
||||
|
||||
... fill out the config file...
|
||||
```shell
|
||||
vi /etc/certwarden-deploy/config.yaml
|
||||
```
|
||||
```yaml
|
||||
# Base URL of the CertWarden instance
|
||||
# required
|
||||
base_url: "https://certwarden.example.com"
|
||||
|
||||
# Set this to true if your CertWarden instance does not have a publicly trusted
|
||||
# TLS certificate (e.g. it has a self signed one)
|
||||
# default is false
|
||||
disable_certificate_validation: false
|
||||
|
||||
# define all managed certificates here
|
||||
certificates:
|
||||
|
||||
# name is a unique identifier that must start and end with an alphanumeric character,
|
||||
# and can contain the following characters: a-zA-Z0-9._-
|
||||
# required
|
||||
- name: test-certificate.example.com
|
||||
|
||||
# Contains the API-Key to fetch the certificate from the server
|
||||
# required
|
||||
|
||||
api_key: examplekey_notvalid_hrzjGDDw8z
|
||||
|
||||
# action to run when certificate was updated or --force is on
|
||||
action: "/usr/bin/systemd reload caddy"
|
||||
|
||||
# path where to save the certificate
|
||||
# required
|
||||
file_path: "/path/to/test-certificate.example.com-cert.pem"
|
||||
```
|
||||
|
||||
... and run it!
|
||||
```shell
|
||||
certwarden-deploy -v
|
||||
```
|
||||
## Contributing
|
||||
|
||||
I use my own [Forgejo Instance](https://code.lila.network) to manage issues and pull requests.
|
||||
|
||||
* If you have a trivial fix or improvement, go ahead and create a pull request,
|
||||
addressing (with `@...`) the maintainer of this repository (see
|
||||
[MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request.
|
||||
|
||||
* If you plan to do something more involved, first please [send me a mail]( mailto:adora@lila.network?subject=%5Bcertwarden-deploy%5D).
|
||||
|
||||
### What to contribute
|
||||
|
||||
The best way to help without speaking a lot of Go would be to share your
|
||||
configuration, alerts, dashboards, and recording rules. If you have something
|
||||
that works and is not in the repository, please pay it forward and
|
||||
share what works.
|
||||
|
||||
## Changelog
|
||||
You can find the Changelog here: [Changelog](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/CHANGELOG.md)
|
||||
|
||||
## License
|
||||
`certwarden-deploy` is available under the MIT license. See the [LICENSE](https://code.lila.network/adoralaura/certwarden-deploy/src/branch/main/LICENSE) file for more info.
|
0
docs/content/docs/configuration/_index.md
Normal file
0
docs/content/docs/configuration/_index.md
Normal file
29
docs/content/docs/introduction/_index.md
Normal file
29
docs/content/docs/introduction/_index.md
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
title: Introduction
|
||||
type: docs
|
||||
---
|
||||
|
||||
# Introduction
|
||||
|
||||
## CertWarden
|
||||
|
||||
[CertWarden](https://www.certwarden.com/) is a self-hosted Centralized ACME Certificate Management platform. With it you can manage and aquire Let's Encrypt certificates.
|
||||
|
||||
However, to deploy them to your hosts, for now there only was a docker client, and that was too bloated for me.
|
||||
|
||||
So I built `certwarden-deploy`, a dependency-less binary that can run via crontab/systemd timers and that can fetch new certificates and run actions after new certificates got rolled out.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Installation of the required CertWarden instance is out of scope of this documentation. For detailed instructions regarding CertWarden, please visit [it's documentation](https://www.certwarden.com/docs/introduction/)
|
||||
|
||||
|
||||
To quickly get started with `certwarden-deploy`, just download the binary and run it.
|
||||
|
||||
```shell
|
||||
# this downloads certwarden-deploy version 0.1.1
|
||||
# to /usr/local/bin/certwarden-deploy
|
||||
sudo wget https://code.lila.network/adoralaura/certwarden-deploy/releases/download/0.1.1/certwarden-deploy-0.1.1-linux-amd64 -O /usr/local/bin/certwarden-deploy
|
||||
|
||||
sudo chmod +x /usr/local/bin/certwarden-deploy
|
||||
```
|
22
docs/content/menu/index.md
Normal file
22
docs/content/menu/index.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
---
|
||||
headless: true
|
||||
---
|
||||
|
||||
- [**Example Site**]({{< relref "/docs/example" >}})
|
||||
- [Table of Contents]({{< relref "/docs/example/table-of-contents" >}})
|
||||
- [With ToC]({{< relref "/docs/example/table-of-contents/with-toc" >}})
|
||||
- [Without ToC]({{< relref "/docs/example/table-of-contents/without-toc" >}})
|
||||
- [Collapsed]({{< relref "/docs/example/collapsed" >}})
|
||||
- [3rd]({{< relref "/docs/example/collapsed/3rd-level" >}})
|
||||
- [4th]({{< relref "/docs/example/collapsed/3rd-level/4th-level" >}})
|
||||
<br />
|
||||
|
||||
- **Shortcodes**
|
||||
- [Buttons]({{< relref "/docs/shortcodes/buttons" >}})
|
||||
- [Columns]({{< relref "/docs/shortcodes/columns" >}})
|
||||
- [Expand]({{< relref "/docs/shortcodes/expand" >}})
|
||||
- [Hints]({{< relref "/docs/shortcodes/hints" >}})
|
||||
- [KaTeX]({{< relref "/docs/shortcodes/katex" >}})
|
||||
- [Mermaid]({{< relref "/docs/shortcodes/mermaid" >}})
|
||||
- [Tabs]({{< relref "/docs/shortcodes/tabs" >}})
|
||||
<br />
|
5
docs/go.mod
Normal file
5
docs/go.mod
Normal file
|
@ -0,0 +1,5 @@
|
|||
module code.lila.network/adoralaura/certwarden-deploy-docs
|
||||
|
||||
go 1.22.2
|
||||
|
||||
require code.lila.network/adoralaura/hugo-book-theme v0.0.0-20240712103017-55b1193ecd34 // indirect
|
2
docs/go.sum
Normal file
2
docs/go.sum
Normal file
|
@ -0,0 +1,2 @@
|
|||
code.lila.network/adoralaura/hugo-book-theme v0.0.0-20240712103017-55b1193ecd34 h1:jgwSyEijB5R4TxGxsO6Lugm1+bcaw7Tz5rCxptmc92A=
|
||||
code.lila.network/adoralaura/hugo-book-theme v0.0.0-20240712103017-55b1193ecd34/go.mod h1:MBe0adh4WF9iMJ51BCRAeKkPUda/JB9RlGUQwmk5qc0=
|
Loading…
Reference in a new issue