feat: example install & upgrade script
This commit is contained in:
parent
014a8795ef
commit
53ded0498f
22
README.md
22
README.md
|
@ -114,6 +114,28 @@ sudo ln -s forgejo-v8 forgejo-v9
|
||||||
sudo systemctl restart wakeup-on-logs-run
|
sudo systemctl restart wakeup-on-logs-run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -x
|
||||||
|
|
||||||
|
self="${BASH_SOURCE[0]}"
|
||||||
|
name=$(basename $self)
|
||||||
|
# keep it lower than https://code.forgejo.org/infrastructure/wakeup-on-logs
|
||||||
|
# otherwise it will get killed by it
|
||||||
|
timeout=4m
|
||||||
|
|
||||||
|
function lxc_run() {
|
||||||
|
lxc-attach $name -- sudo --user debian KUBECONFIG=/etc/rancher/k3s/k3s.yaml "$@" |& tee -a /var/log/$name.log
|
||||||
|
}
|
||||||
|
|
||||||
|
image=codeberg.org/forgejo-experimental/forgejo
|
||||||
|
major=${name##*v}
|
||||||
|
digest=$(skopeo inspect --format "{{.Digest}}" docker://$image:$major-rootless)
|
||||||
|
values=https://code.forgejo.org/infrastructure/k8s/raw/branch/main/forgejo-v$major/values.yml
|
||||||
|
lxc_run helm upgrade forgejo -f $values -f /home/debian/secrets.yml oci://code.forgejo.org/forgejo-helm/forgejo --atomic --wait --timeout $timeout --install --set image.digest=$digest
|
||||||
|
```
|
||||||
|
|
||||||
## Define Forgejo Helm values
|
## Define Forgejo Helm values
|
||||||
|
|
||||||
* https://code.forgejo.org/infrastructure/k8s/src/branch/main/forgejo-v$version/values.yml
|
* https://code.forgejo.org/infrastructure/k8s/src/branch/main/forgejo-v$version/values.yml
|
||||||
|
|
Loading…
Reference in a new issue