From 51a1f2951e8f3c20201fa073d2d5ea75b3b991d2 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Sat, 30 Mar 2024 22:25:54 +0100 Subject: [PATCH] developer: infrastructure: v7.next.forgejo.org --- docs/developer/infrastructure.md | 47 ++++++++++++++++++++++++++++-- docs/developer/next-forgejo-org.md | 18 +++--------- 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/docs/developer/infrastructure.md b/docs/developer/infrastructure.md index 6221d571..6bf85c1f 100644 --- a/docs/developer/infrastructure.md +++ b/docs/developer/infrastructure.md @@ -267,6 +267,8 @@ IP allocated to the LXC container running the web service: ``` server { + listen 80; + listen [::]:80; server_name code.forgejo.org; @@ -319,6 +321,8 @@ It hosts LXC containers setup with [lxc-helpers](https://code.forgejo.org/forgej bash -x /home/debian/run-forgejo.sh docker logs -n 200 -f forgejo ``` + - Rotating 30 days backups happen daily `/etc/cron.daily/forgejo-code-backup.sh` + - Add code.forgejo.org to the forgejo.org SPF record - `forgejo-next` on hetzner02 @@ -335,7 +339,6 @@ It hosts LXC containers setup with [lxc-helpers](https://code.forgejo.org/forgej sudo mv /srv/forgejo /srv/forgejo.old bash -x /home/debian/run-forgejo.sh ``` - and create a user with the CLI using the example from `/home/debian/run-forgejo.sh` - `/home/debian/next.nftables` ``` add table ip next; @@ -346,9 +349,49 @@ It hosts LXC containers setup with [lxc-helpers](https://code.forgejo.org/forgej ip daddr 65.21.67.65 tcp dport { 2020 } dnat to 10.6.83.213; }; ``` + - Add to `iface enp5s0 inet static` in `/etc/network/interfaces` + ``` + up nft -f /home/debian/next.nftables + ``` + + ``` - `/etc/nginx/sites-available/next.forgejo.org` same as `/etc/nginx/sites-available/code.forgejo.org` - Rotating 30 days backups happen daily `/etc/cron.daily/forgejo-code-backup.sh` + ``` + +- `forgejo-v7` on hetzner02 + + Dedicated to https://v7.next.forgejo.org + + - LXC creation same as code.forgejo.org + - `/etc/cron.hourly/forgejo-upgrade` runs `/home/debian/run-forgejo.sh > /home/debian/run-forgejo-$(date +%d).log` + - Reset everything + ```sh + docker stop forgejo + docker rm forgejo + sudo rm -fr /srv/forgejo.old + sudo mv /srv/forgejo /srv/forgejo.old + bash -x /home/debian/run-forgejo.sh + ``` + - `/home/debian/v7.nftables` + ``` + add table ip v7; + flush table ip v7; + add chain ip v7 prerouting { + type nat hook prerouting priority 0; + policy accept; + ip daddr 65.21.67.65 tcp dport { 2070 } dnat to 10.6.83.179; + }; + ``` + - Add to `iface enp5s0 inet static` in `/etc/network/interfaces` + ``` + up nft -f /home/debian/v7.nftables + ``` + + ``` + - `/etc/nginx/sites-available/v7.forgejo.org` same as `/etc/nginx/sites-available/code.forgejo.org` + + ``` - `runner-forgejo-helm` on hetzner03 diff --git a/docs/developer/next-forgejo-org.md b/docs/developer/next-forgejo-org.md index bb29d9d1..8defa682 100644 --- a/docs/developer/next-forgejo-org.md +++ b/docs/developer/next-forgejo-org.md @@ -7,20 +7,10 @@ _This is the developer documentation for Forgejo Next, covering technical details for Forgejo contributors. [Go to end-user documentation for service overview.](../../user/forgejo-next/)_ -https://next.forgejo.org, also known as Forgejo Next, is Forgejo's -official testing and demonstration instance. The specific version of -Forgejo running on this instance varies depending on the status of the -latest release branch. +The Forgejo instances running under the `next.forgejo.org` domain are official testing and demonstration instance. They are updated daily. The data they contain may be wiped out without notice. -Typically, the instance will be running the daily build straight from the -`forgejo` branch, meaning it contains experimental code that will be -included in the next major version of Forgejo. +- https://next.forgejo.org runs the tip of the [forgejo branch](https://codeberg.org/forgejo/forgejo/src/branch/forgejo). +- https://v7.next.forgejo.org runs from the [codeberg.org/forgejo-experimental/forgejo:7](https://codeberg.org/forgejo-experimental/-/packages/container/forgejo/7) OCI image. It is built from the latest commit of the most recent branch. -When a release branch is created and release candidates are posted, -Forgejo Next will be switched to the latest release candidate. Release -candidates are to be deployed until a stable release is -available. next.forgejo.org will then be upgraded back to the -`forgejo` branch. - -For details on the hardward from which it is running, [checkout the section in the +For details on the hardware from which it is running, [checkout the section in the infrastructe documentation](../infrastructure/#containers).