Compare commits
70 commits
next
...
backport/v
Author | SHA1 | Date | |
---|---|---|---|
323551764d | |||
855730b87d | |||
|
47d3bbbd3d | ||
864582f6d0 | |||
|
1e129c800f | ||
ed3267dad6 | |||
1952be7409 | |||
|
789c2bee74 | ||
0707a28ebf | |||
c4f955c4d8 | |||
02ee40e027 | |||
7d5578e16e | |||
d622bf1505 | |||
|
ae1297960c | ||
dc90b37d8c | |||
99d49d3365 | |||
|
05ce897d18 | ||
8155e636d1 | |||
12a19985bb | |||
|
df152d4182 | ||
|
3326ca60d7 | ||
|
ddf959a475 | ||
d0666b1bfd | |||
8371da465f | |||
a83274e296 | |||
8c651a91c7 | |||
e564335324 | |||
4609582481 | |||
|
b3a86302e2 | ||
|
9a82bf41bc | ||
b630aedee0 | |||
e2bd7bc8a6 | |||
|
034a105374 | ||
e619200f52 | |||
|
8199991118 | ||
922d9a91a3 | |||
61beb1afcc | |||
|
264447c0f1 | ||
f0f8322943 | |||
|
4db9cb08cd | ||
|
adec18c29d | ||
|
b0e096dbaa | ||
faf25f747f | |||
89966a10a5 | |||
|
48ca2baa98 | ||
|
537746e8a9 | ||
|
2fd68bd1c2 | ||
|
96c561f09f | ||
|
1280915ffa | ||
|
88a8a9f734 | ||
07865ed7ff | |||
680cdd34b1 | |||
|
b08aaf57c8 | ||
|
d39405ea95 | ||
|
81c31abdd5 | ||
7acc15dbca | |||
845378b29d | |||
f89d4d568d | |||
f0b99af484 | |||
88bd56c31c | |||
|
c06d726ecf | ||
46e5cf2f22 | |||
05c3a5d43d | |||
|
f37365b4bc | ||
|
11048364ab | ||
|
6045d15696 | ||
726f8cb2bc | |||
|
71ce2ff514 | ||
c874343142 | |||
e9523e7732 |
23 changed files with 266 additions and 601 deletions
|
@ -1,35 +0,0 @@
|
|||
name: Links
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '00 18 * * *'
|
||||
jobs:
|
||||
linkChecker:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout next
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout v7
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: v7
|
||||
|
||||
- name: Install lychee
|
||||
run: |
|
||||
curl -sLO "https://github.com/lycheeverse/lychee/releases/download/v0.15.0/lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz"
|
||||
tar -xvzf "lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz"
|
||||
rm "lychee-v0.15.0-x86_64-unknown-linux-gnu.tar.gz"
|
||||
install -t "$HOME/.local/bin" -D lychee
|
||||
|
||||
- name: Link Checker
|
||||
id: lychee
|
||||
run: ./lychee docs v7/docs --format markdown
|
||||
|
||||
- name: Update issue
|
||||
if: failure()
|
||||
uses: https://github.com/peter-evans/create-issue-from-file@v5.0.0
|
||||
with:
|
||||
title: Dead links report
|
||||
issue-number: 583
|
||||
content-filepath: ./report.md
|
Binary file not shown.
Before Width: | Height: | Size: 51 KiB |
Binary file not shown.
Before Width: | Height: | Size: 48 KiB |
|
@ -64,7 +64,6 @@ USAGE:
|
|||
|
||||
COMMANDS:
|
||||
actions Commands for managing Forgejo Actions
|
||||
f3 F3
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
|
@ -97,7 +96,7 @@ NAME:
|
|||
forgejo forgejo-cli actions generate-runner-token - Generate a new token for a runner to use to register with the server
|
||||
|
||||
USAGE:
|
||||
forgejo forgejo-cli actions generate-runner-token [command options]
|
||||
forgejo forgejo-cli actions generate-runner-token [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--scope value, -s value {owner}[/{repo}] - leave empty for a global runner
|
||||
|
@ -111,7 +110,7 @@ NAME:
|
|||
forgejo forgejo-cli actions generate-secret - Generate a secret suitable for input to the register subcommand
|
||||
|
||||
USAGE:
|
||||
forgejo forgejo-cli actions generate-secret [command options]
|
||||
forgejo forgejo-cli actions generate-secret [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help
|
||||
|
@ -124,7 +123,7 @@ NAME:
|
|||
forgejo forgejo-cli actions register - Idempotent registration of a runner using a shared secret
|
||||
|
||||
USAGE:
|
||||
forgejo forgejo-cli actions register [command options]
|
||||
forgejo forgejo-cli actions register [command options] [arguments...]
|
||||
|
||||
OPTIONS:
|
||||
--secret value the secret the runner will use to connect as a 40 character hexadecimal string
|
||||
|
@ -137,23 +136,6 @@ OPTIONS:
|
|||
--help, -h show help
|
||||
```
|
||||
|
||||
### forgejo-cli f3
|
||||
|
||||
```
|
||||
NAME:
|
||||
forgejo forgejo-cli f3 - F3
|
||||
|
||||
USAGE:
|
||||
forgejo forgejo-cli f3 command [command options]
|
||||
|
||||
COMMANDS:
|
||||
mirror Mirror
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
||||
OPTIONS:
|
||||
--help, -h show help
|
||||
```
|
||||
|
||||
## web
|
||||
|
||||
```
|
||||
|
@ -207,7 +189,7 @@ OPTIONS:
|
|||
--verbose, -V Show process details (default: false)
|
||||
--quiet, -q Only display warnings and errors (default: false)
|
||||
--tempdir value, -t value Temporary dir path (default: "/tmp")
|
||||
--database value, -d value Specify the database SQL syntax: sqlite3, mysql, postgres
|
||||
--database value, -d value Specify the database SQL syntax: sqlite3, mysql, mssql, postgres
|
||||
--skip-repository, -R Skip the repository dumping (default: false)
|
||||
--skip-log, -L Skip the log dumping (default: false)
|
||||
--skip-custom-dir Skip custom directory (default: false)
|
||||
|
@ -990,7 +972,7 @@ USAGE:
|
|||
forgejo doctor convert command [command options]
|
||||
|
||||
DESCRIPTION:
|
||||
A command to convert an existing MySQL database from utf8 to utf8mb4
|
||||
A command to convert an existing MySQL database from utf8 to utf8mb4 or MSSQL database from varchar to nvarchar
|
||||
|
||||
COMMANDS:
|
||||
help, h Shows a list of commands or help for one command
|
||||
|
@ -1542,7 +1524,7 @@ NAME:
|
|||
forgejo cert - Generate self-signed certificate
|
||||
|
||||
USAGE:
|
||||
forgejo cert [command options]
|
||||
forgejo cert [command options] [arguments...]
|
||||
|
||||
DESCRIPTION:
|
||||
Generate a self-signed X.509 certificate for a TLS server.
|
||||
|
|
|
@ -55,9 +55,6 @@ In addition, there is _`StaticRootPath`_ which can be set as a built-in at build
|
|||
## Overall (`DEFAULT`)
|
||||
|
||||
- `APP_NAME`: **Forgejo: Beyond coding. We forge.**: Application name, used in the page title.
|
||||
- `APP_SLOGAN`: Application slogan, used in the page title.
|
||||
- `APP_DISPLAY_NAME_FORMAT`: **{APP_NAME}: {APP_SLOGAN}**: defines how the application full name should be presented.
|
||||
It is only used if `APP_SLOGAN` is set.
|
||||
- `RUN_USER`: **_current OS username_/`$USER`/`$USERNAME` e.g. git**: The user Forgejo will run as.
|
||||
This should be a dedicated system (non-user) account. Setting this incorrectly will cause Forgejo
|
||||
to not start.
|
||||
|
@ -449,7 +446,7 @@ The following configuration set `Content-Type: application/vnd.android.package-a
|
|||
- `LOG_SQL`: **false**: Log the executed SQL.
|
||||
- `DB_RETRIES`: **10**: How many ORM init / DB connect attempts allowed.
|
||||
- `DB_RETRY_BACKOFF`: **3s**: time.Duration to wait before trying another ORM init / DB connect attempt, if failure occurred.
|
||||
- `MAX_OPEN_CONNS` **100**: Database maximum open connections. Default is 100 which is the lowest default from Postgres (MariaDB + MySQL default to 151). Setting this value higher than your database server can handle will lead to issues. If you require high concurrency, try to increase this value for both Forgejo and your database server.
|
||||
- `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit.
|
||||
- `MAX_IDLE_CONNS` **2**: Max idle database connections on connection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`.
|
||||
- `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL/MariaDB where it is 3s - see #6804 & #7071).
|
||||
- `CONN_MAX_IDLETIME` **0**: Sets the maximum amount of time a DB connection may be idle - default is 0, meaning there is no limit.
|
||||
|
@ -598,6 +595,8 @@ And the following unique queues:
|
|||
|
||||
## OAuth2 Client (`oauth2_client`)
|
||||
|
||||
**Note**: Please note that if `SAME_SITE` is set to `strict` then login via an external OAuth2 provider may be broken. - this is a [known bug](https://codeberg.org/forgejo/forgejo/issues/1205).
|
||||
|
||||
- `REGISTER_EMAIL_CONFIRM`: _[service]_ **REGISTER_EMAIL_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER_EMAIL_CONFIRM setting of the `[service]` section)
|
||||
- `OPENID_CONNECT_SCOPES`: **\<empty\>**: List of additional openid connect scopes. (`openid` is implicitly added)
|
||||
- `ENABLE_AUTO_REGISTRATION`: **false**: Automatically create user accounts for new oauth2 users.
|
||||
|
@ -1309,6 +1308,5 @@ PROXY_HOSTS = *.github.com
|
|||
|
||||
- `SHOW_FOOTER_VERSION`: **true**: Show Forgejo and Go version information in the footer.
|
||||
- `SHOW_FOOTER_TEMPLATE_LOAD_TIME`: **true**: Show time of template execution in the footer.
|
||||
- `SHOW_FOOTER_POWERED_BY`: **true**: Show the "powered by" text in the footer.
|
||||
- `ENABLE_SITEMAP`: **true**: Generate sitemap.
|
||||
- `ENABLE_FEED`: **true**: Enable/Disable RSS/Atom feed.
|
||||
|
|
|
@ -11,7 +11,7 @@ docker pull codeberg.org/forgejo/forgejo:7.0.3
|
|||
|
||||
If `codeberg.org` can not be accessed you can replace every mention of `codeberg.org` with `code.forgejo.org` to use our mirror.
|
||||
|
||||
The **7** tag is set to be the latest minor release, starting with **7.0.x**. The **7** tag will then be equal to **7.0.4** when it is released and so on. The **7.0** tag is also set to be the latest patch version release.
|
||||
The **7** tag is set to be the latest minor release, starting with **7.0.3**. The **7** tag will then be equal to **7.0.3** when it is released and so on.
|
||||
|
||||
Upgrading from **X** to **X+1** (for instance from **7** to **8**) requires a [manual operation and human verification](../upgrade/). However it is possible to use the **X** tag (for instance **7**) to get the latest minor release automatically.
|
||||
|
||||
|
|
|
@ -3,13 +3,10 @@ title: 'Installation'
|
|||
license: 'CC-BY-SA-4.0'
|
||||
---
|
||||
|
||||
Forgejo publishes a stable release every three months and a long term support
|
||||
(LTS) release every year. Patch releases are published more frequently and
|
||||
provide fixes for bugs and security vulnerabilities. Please review the
|
||||
[releases management](../../developer/release) and
|
||||
also the
|
||||
[Forgejo versioning scheme](../../user/versions) documentation for further
|
||||
information.
|
||||
Forgejo publishes a stable release every three months and a long term
|
||||
support (LTS) release every year. Patch releases are published more
|
||||
frequently and provide fixes for bugs and security
|
||||
vulnerabilities. See also how [the Forgejo versioning scheme](../../user/versions) works.
|
||||
|
||||
This guide covers the installation of Forgejo [with
|
||||
Docker](../installation-docker/) or [from
|
||||
|
@ -17,9 +14,9 @@ binary](../installation-binary/). Both of these methods are created
|
|||
and extensively tested to work on every release. They consist of three
|
||||
steps:
|
||||
|
||||
- Download and run the release,
|
||||
- connect to the web interface and complete the configuration, and,
|
||||
- finally register the first user which will be granted administrative permissions.
|
||||
- Download and run the release
|
||||
- Connect to the web interface and complete the configuration
|
||||
- And finally register the first user which will be granted administrative permissions
|
||||
|
||||
If you already have Gitea installed through your package manager, look at the [Gitea
|
||||
migration](../gitea-migration/) guide for information on how to install Forgejo, while
|
||||
|
|
|
@ -19,7 +19,7 @@ $ gopass recipients add
|
|||
```
|
||||
|
||||
3. [Install gopass](https://www.gopass.pw/#install)
|
||||
> :warning: When installing on Ubuntu or Debian you can either [download the deb package](https://github.com/gopasspw/gopass/tags), install manually or build from source or use our APT repository ([github comment](https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285) with more information).
|
||||
> :warning: When installing on Ubuntu or Debian you can either download the deb package, install manually or build from source or use our APT repository ([github comment](https://github.com/gopasspw/gopass/issues/1849#issuecomment-802789285) with more information).
|
||||
4. Clone this repo using `gopass` (the name and email are for `git config`)
|
||||
|
||||
```
|
||||
|
|
|
@ -19,7 +19,6 @@ their needs.
|
|||
- [Developer Certificate of Origin (DCO)](./dco/)
|
||||
- [code.forgejo.org](./code-forgejo-org/)
|
||||
- [next.forgejo.org](./next-forgejo-org/)
|
||||
- [static pages](./static-pages/)
|
||||
- [Forgejo runner implementation notes](https://code.forgejo.org/forgejo/runner/#hacking)
|
||||
- [Localization](./localization/)
|
||||
- [Base localization](./localization-english/)
|
||||
|
|
|
@ -3,195 +3,6 @@ title: Hardware infrastructure
|
|||
license: 'CC-BY-SA-4.0'
|
||||
---
|
||||
|
||||
## LXC Hosts
|
||||
|
||||
All LXC hosts are setup with [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/).
|
||||
|
||||
```sh
|
||||
name=forgejo-host
|
||||
lxc-helpers.sh lxc_container_run $name -- sudo --user debian bash
|
||||
```
|
||||
|
||||
### Unprivileged
|
||||
|
||||
```sh
|
||||
name=forgejo-host
|
||||
lxc-helpers.sh lxc_container_create --config "unprivileged" $name
|
||||
echo "lxc.start.auto = 1" | sudo tee -a /var/lib/lxc/$name/config
|
||||
lxc-helpers.sh lxc_container_start $name
|
||||
lxc-helpers.sh lxc_container_user_install $name $(id -u) $USER
|
||||
```
|
||||
|
||||
### Docker enabled
|
||||
|
||||
```sh
|
||||
name=forgejo-host
|
||||
lxc-helpers.sh lxc_container_create --config "docker" $name
|
||||
echo "lxc.start.auto = 1" | sudo tee -a /var/lib/lxc/$name/config
|
||||
lxc-helpers.sh lxc_container_start $name
|
||||
lxc-helpers.sh lxc_install_docker $name
|
||||
lxc-helpers.sh lxc_container_user_install $name $(id -u) $USER
|
||||
```
|
||||
|
||||
### Docker and LXC enabled
|
||||
|
||||
```sh
|
||||
name=forgejo-host
|
||||
ipv4=10.85.12
|
||||
ipv6=fc33
|
||||
lxc-helpers.sh lxc_container_create --config "docker lxc" $name
|
||||
echo "lxc.start.auto = 1" | sudo tee -a /var/lib/lxc/$name/config
|
||||
lxc-helpers.sh lxc_container_start $name
|
||||
lxc-helpers.sh lxc_install_docker $name
|
||||
lxc-helpers.sh lxc_install_lxc forgejo-runner-host $ipv4 $ipv6
|
||||
lxc-helpers.sh lxc_container_user_install $name $(id -u) $USER
|
||||
```
|
||||
|
||||
## Host reverse proxy
|
||||
|
||||
The reverse proxy on a host forwards to the designated LXC container with
|
||||
something like the following examples in
|
||||
`/etc/nginx/sites-available/example.com`, where A.B.C.D is the
|
||||
IP allocated to the LXC container running the web service.
|
||||
|
||||
And symlink:
|
||||
|
||||
```sh
|
||||
ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com
|
||||
```
|
||||
|
||||
The certificate is obtained once and automatically renewed with:
|
||||
|
||||
```
|
||||
sudo apt-get install certbot python3-certbot-nginx
|
||||
sudo certbot -n --agree-tos --email contact@forgejo.org -d example.com --nginx
|
||||
```
|
||||
|
||||
### Forgejo example
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name example.com;
|
||||
|
||||
location / {
|
||||
deny 47.76.209.138; # crawler that does not obey robots.txt
|
||||
deny 47.76.99.127; # crawler that does not obey robots.txt
|
||||
proxy_pass http://A.B.C.D:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
client_max_body_size 2G;
|
||||
#
|
||||
# http://nginx.org/en/docs/http/websocket.html
|
||||
#
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
include proxy_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### GitLab example
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name example.com;
|
||||
|
||||
location / {
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Frame-Options SAMEORIGIN;
|
||||
|
||||
client_body_timeout 60;
|
||||
client_max_body_size 200M;
|
||||
send_timeout 1200;
|
||||
lingering_timeout 5;
|
||||
|
||||
proxy_buffering off;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_send_timeout 300;
|
||||
proxy_read_timeout 600s;
|
||||
|
||||
proxy_pass http://example.com;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Vanila example
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name example.com;
|
||||
|
||||
location / {
|
||||
proxy_pass http://A.B.C.D;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto https;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Forgejo runners
|
||||
|
||||
The LXC container in which the runner is installed must have capabilities that support the backend.
|
||||
|
||||
- docker:// needs a Docker enabled container
|
||||
- lxc:// needs a Docker and LXC enabled container
|
||||
|
||||
The runners it contains are not started at boot, it must be done manually. The bash history has the command line to do so.
|
||||
|
||||
### Installation
|
||||
|
||||
```shell
|
||||
version=3.4.1
|
||||
sudo wget -O /usr/local/bin/forgejo-runner-$version https://code.forgejo.org/forgejo/runner/releases/download/v$version/forgejo-runner-$version-linux-amd64
|
||||
sudo chmod +x /usr/local/bin/forgejo-runner-$version
|
||||
echo 'export TERM=xterm-256color' >> .bashrc
|
||||
```
|
||||
|
||||
### Creating a runner
|
||||
|
||||
Multiple runners can co-exist on the same machine. To keep things
|
||||
organized they are located in a directory that is the same as the URL
|
||||
from which the token is obtained. For instance
|
||||
DIR=codeberg.org/forgejo-integration means that the token was obtained from the
|
||||
https://codeberg.org/forgejo-integration organization.
|
||||
|
||||
If a runner only provides unprivileged docker containers, the labels
|
||||
in `config.yml` should be:
|
||||
`labels: ['docker:docker://node:20-bookworm']`.
|
||||
|
||||
If a runner provides LXC containers and unprivileged docker
|
||||
containers, the labels in `config.yml` should be
|
||||
`labels: ['self-hosted:lxc://debian:bookworm', 'docker:docker://node:20-bookworm']`.
|
||||
|
||||
```shell
|
||||
name=myrunner
|
||||
mkdir -p $DIR ; cd $DIR
|
||||
forgejo-runner generate-config > config-$name.yml
|
||||
## edit config-$name.yml and adjust the `labels:`
|
||||
## Obtain a $TOKEN from https://$DIR
|
||||
forgejo-runner-$version register --no-interactive --token $TOKEN --name runner --instance https://codeberg.org
|
||||
forgejo-runner-$version --config config-$name.yml daemon |& cat -v > runner.log &
|
||||
```
|
||||
|
||||
## Octopuce
|
||||
|
||||
[Octopuce provides hardware](https://codeberg.org/forgejo/sustainability) managed by [the devops team](https://codeberg.org/forgejo/governance/src/branch/main/TEAMS.md#devops). It can only be accessed via SSH.
|
||||
|
@ -206,11 +17,19 @@ firefox http://private.forgejo.org
|
|||
|
||||
### Containers
|
||||
|
||||
It hosts LXC containers setup with [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/).
|
||||
|
||||
- `fogejo-host`
|
||||
|
||||
Dedicated to http://private.forgejo.org
|
||||
|
||||
- Docker enabled
|
||||
- LXC creation
|
||||
```sh
|
||||
lxc-helpers.sh lxc_container_create --config "docker" forgejo-host
|
||||
lxc-helpers.sh lxc_container_start forgejo-host
|
||||
lxc-helpers.sh lxc_install_docker forgejo-host
|
||||
lxc-helpers.sh lxc_container_user_install forgejo-host $(id -u) $USER
|
||||
```
|
||||
- upgrades checklist:
|
||||
```sh
|
||||
emacs /home/debian/run-forgejo.sh # change the `image=`
|
||||
|
@ -225,18 +44,66 @@ firefox http://private.forgejo.org
|
|||
|
||||
Has runners installed to run against private.forgejo.org
|
||||
|
||||
- Docker and LXC enabled 10.85.12 fc33
|
||||
- LXC creation
|
||||
```sh
|
||||
lxc-helpers.sh lxc_container_create --config "docker" forgejo-runner-host
|
||||
lxc-helpers.sh lxc_container_start forgejo-runner-host
|
||||
lxc-helpers.sh lxc_install_docker forgejo-runner-host
|
||||
lxc-helpers.sh lxc_install_lxc forgejo-runner-host 10.85.12 fc33
|
||||
lxc-helpers.sh lxc_container_user_install forgejo-runner-host $(id -u) $USER
|
||||
```
|
||||
|
||||
## Hetzner
|
||||
|
||||
All hardware machines are running Debian GNU/linux bookworm. They are LXC hosts
|
||||
setup with [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/).
|
||||
All hardware is running Debian GNU/linux bookworm.
|
||||
|
||||
> **NOTE:** only use [EX101 with a ASRockRack W680D4U-1L motherboard](https://forum.hetzner.com/index.php?thread/31135-all-ex101-with-asustek-w680-crash-on-sequential-read/).
|
||||
### hetzner01
|
||||
|
||||
### vSwitch
|
||||
https://hetzner01.forgejo.org runs on an [EX101](https://www.hetzner.com/dedicated-rootserver/ex101) Hetzner hardware.
|
||||
|
||||
A vSwitch is assigned via the Robot console on all servers for backend communications
|
||||
There is no backup, no redundancy and is dedicated to Forgejo runner instances.
|
||||
If the hardware reboots, the runners do not restart automatically, they have to be restarted manually.
|
||||
|
||||
It hosts LXC containers setup with [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/):
|
||||
|
||||
- `forgejo-runners`
|
||||
|
||||
Dedicated to Forgejo runners for the https://codeberg.org/forgejo organization.
|
||||
|
||||
```sh
|
||||
lxc-helpers.sh lxc_container_run forgejo-runners -- sudo --user debian bash
|
||||
cd codeberg.org/forgejo/
|
||||
forgejo-runner-3.2.0 --config config.yml daemon >& runner.log &
|
||||
```
|
||||
|
||||
- `runner01-lxc`
|
||||
|
||||
Dedicated to Forgejo runners for the https://code.forgejo.org
|
||||
organization with two labels: **docker** and **self-hosted**.
|
||||
|
||||
- https://code.forgejo.org/forgejo
|
||||
- https://code.forgejo.org/actions
|
||||
- https://code.forgejo.org/forgejo-integration
|
||||
- https://code.forgejo.org/forgejo-contrib
|
||||
|
||||
```sh
|
||||
lxc-helpers.sh lxc_container_run runner01-lxc -- sudo --user debian bash
|
||||
cd code.forgejo.org
|
||||
for runner in forgejo-contrib forgejo forgejo-integration actions ; do ( cd $runner ; HOME=/srv/$runner forgejo-runner-3.2.0 --config config.yml daemon >&runner.log & ) ; done
|
||||
```
|
||||
|
||||
The runners are installed with something like:
|
||||
|
||||
```sh
|
||||
sudo wget -O /usr/local/bin/forgejo-runner-3.2.0 https://code.forgejo.org/forgejo/runner/releases/download/v3.2.0/forgejo-runner-3.2.0-linux-amd64
|
||||
sudo chmod +x /usr/local/bin/forgejo-runner-3.2.0
|
||||
```
|
||||
|
||||
### hetzner{02,03}
|
||||
|
||||
https://hetzner02.forgejo.org & https://hetzner03.forgejo.org run on [EX44](https://www.hetzner.com/dedicated-rootserver/ex44) Hetzner hardware.
|
||||
|
||||
A vSwitch is assigned via the Robot console on both servers
|
||||
and [configured](https://docs.hetzner.com/robot/dedicated-server/network/vswitch#example-debian-configuration)
|
||||
in /etc/network/interfaces for each of them with something like:
|
||||
|
||||
|
@ -249,15 +116,18 @@ iface enp5s0.4000 inet static
|
|||
mtu 1400
|
||||
```
|
||||
|
||||
The IP address ends with the same number as the hardware (hetzner02 => .2).
|
||||
#### Root filesystem backups
|
||||
|
||||
### DRBD
|
||||
- `hetzner03:/etc/cron.daily/backup-hetzner02`
|
||||
`rsync -aHS --delete-excluded --delete --numeric-ids --exclude /proc --exclude /dev --exclude /sys --exclude /srv --exclude /var/lib/lxc 10.53.100.2:/ /srv/backups/hetzner02/`
|
||||
- `hetzner02:/etc/cron.daily/backup-hetzner03`
|
||||
`rsync -aHS --delete-excluded --delete --numeric-ids --exclude /proc --exclude /dev --exclude /sys --exclude /srv --exclude /var/lib/lxc 10.53.100.3:/ /srv/backups/hetzner03/`
|
||||
|
||||
DRBD is [configured](https://linbit.com/drbd-user-guide/drbd-guide-9_0-en/#p-work) like in the following example with hetzner02 as the primary and hetzner03 as the secondary:
|
||||
#### DRBD
|
||||
|
||||
```sh
|
||||
$ apt-get install drbd-utils
|
||||
$ cat /etc/drbd.d/r0.res
|
||||
DRBD is configured with hetzner02 as the primary and hetzner03 as the secondary:
|
||||
|
||||
```
|
||||
resource r0 {
|
||||
net {
|
||||
# A : write completion is determined when data is written to the local disk and the local TCP transmission buffer
|
||||
|
@ -292,28 +162,21 @@ resource r0 {
|
|||
}
|
||||
}
|
||||
}
|
||||
$ sudo drbdadm create-md r0
|
||||
$ sudo drbdadm up r0
|
||||
```
|
||||
|
||||
On hetzner02 (the primary), [pretend all is in sync](https://linbit.com/drbd-user-guide/drbd-guide-9_0-en/#s-skip-initial-resync) to save the initial bitmap sync since
|
||||
there is actually no data at all.
|
||||
The DRBD device is mounted on `/var/lib/lxc`.
|
||||
|
||||
```sh
|
||||
sudo drbdadm new-current-uuid --clear-bitmap r0/0
|
||||
```
|
||||
|
||||
The DRBD device is mounted on `/var/lib/lxc` in `/etc/fstab` there is a noauto line:
|
||||
In `/etc/fstab` there is a noauto line:
|
||||
|
||||
```
|
||||
/dev/drbd0 /var/lib/lxc ext4 noauto,defaults 0 0
|
||||
```
|
||||
|
||||
To prevent split brain situations a manual step is required at boot
|
||||
time, on the machine that is going to be the primary.
|
||||
time, on the machine that is going to be the primary, which is
|
||||
hetzner02 in a normal situation.
|
||||
|
||||
```sh
|
||||
sudo drbdadm up r0
|
||||
sudo drbdsetup status
|
||||
sudo drbdadm primary r0
|
||||
sudo mount /var/lib/lxc
|
||||
|
@ -322,114 +185,37 @@ sudo lxc-ls -f
|
|||
sudo drbdsetup status
|
||||
```
|
||||
|
||||
### hetzner{01,04}
|
||||
#### Fast storage on /srv
|
||||
|
||||
https://hetzner{01,04}.forgejo.org run on [EX101](https://www.hetzner.com/dedicated-rootserver/ex101) Hetzner hardware.
|
||||
The second disk on each node is mounted on /srv and can be used when
|
||||
fast storage is needed and there is no need for backups, such as Forgejo runners.
|
||||
|
||||
#### LXC
|
||||
|
||||
```sh
|
||||
lxc-helpers.sh lxc_install_lxc_inside 10.41.13 fc29
|
||||
LXC is setup with [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/).
|
||||
|
||||
The `/etc/default/lxc-net` file is the same on both machines:
|
||||
|
||||
```
|
||||
|
||||
#### Disk partitioning
|
||||
|
||||
- First disk
|
||||
- OS
|
||||
- a partition mounted on /srv where non precious data goes such as the LXC containers with runners.
|
||||
- Second disk
|
||||
- configured with DRBD for precious data.
|
||||
|
||||
#### Root filesystem backups
|
||||
|
||||
- `hetzner01:/etc/cron.daily/backup-hetzner04`
|
||||
`rsync -aHS --delete-excluded --delete --numeric-ids --exclude /proc --exclude /dev --exclude /sys --exclude /precious --exclude /srv --exclude /var/lib/lxc 10.53.100.4:/ /srv/backups/hetzner04/ >& /var/log/$(basename $0).log`
|
||||
- `hetzner04:/etc/cron.daily/backup-hetzner01`
|
||||
`rsync -aHS --delete-excluded --delete --numeric-ids --exclude /proc --exclude /dev --exclude /sys --exclude /precious --exclude /srv --exclude /var/lib/lxc 10.53.100.1:/ /srv/backups/hetzner01/ >& /var/log/$(basename $0).log`
|
||||
|
||||
#### LXC containers
|
||||
|
||||
- `forgejo-runners` (hetzner01)
|
||||
|
||||
Dedicated to Forgejo runners for the https://codeberg.org/forgejo organization.
|
||||
|
||||
- Docker enabled
|
||||
- codeberg.org/forgejo/config\*.yml
|
||||
|
||||
- `runner01-lxc` (hetzner01)
|
||||
|
||||
Dedicated to Forgejo runners for https://code.forgejo.org.
|
||||
|
||||
- Docker and LXC enabled 10.194.201 fc35
|
||||
- code.forgejo.org/forgejo/config\*.yml
|
||||
- code.forgejo.org/actions/config\*.yml
|
||||
- code.forgejo.org/forgejo-integration/config\*.yml
|
||||
- code.forgejo.org/forgejo-contrib/config\*.yml
|
||||
- code.forgejo.org/f3/config\*.yml
|
||||
- code.forgejo.org/forgefriends/config\*.yml
|
||||
|
||||
- `forgefriends-forum` (hetzner04)
|
||||
|
||||
Dedicated to https://forum.forgefriends.org
|
||||
|
||||
- Docker enabled
|
||||
|
||||
- `forgefriends-gitlab` (hetzner04)
|
||||
|
||||
Dedicated to https://lab.forgefriends.org
|
||||
|
||||
- Docker enabled
|
||||
|
||||
- `forgefriends-cloud` (hetzner04)
|
||||
|
||||
Dedicated to https://cloud.forgefriends.org
|
||||
|
||||
- Docker enabled
|
||||
|
||||
- `gna-forgejo` (hetzner04)
|
||||
|
||||
Dedicated to https://forgejo.gna.org
|
||||
|
||||
- Docker enabled
|
||||
|
||||
- `gna-forum` (hetzner04)
|
||||
|
||||
Dedicated to https://forum.gna.org
|
||||
|
||||
- Docker enabled
|
||||
|
||||
### hetzner{02,03}
|
||||
|
||||
https://hetzner02.forgejo.org & https://hetzner03.forgejo.org run on [EX44](https://www.hetzner.com/dedicated-rootserver/ex44) Hetzner hardware.
|
||||
|
||||
#### LXC
|
||||
|
||||
```sh
|
||||
lxc-helpers.sh lxc_install_lxc_inside 10.6.83 fc16
|
||||
USE_LXC_BRIDGE="true"
|
||||
LXC_ADDR="10.6.83.1"
|
||||
LXC_NETMASK="255.255.255.0"
|
||||
LXC_NETWORK="10.6.83.0/24"
|
||||
LXC_DHCP_RANGE="10.6.83.2,10.6.83.254"
|
||||
LXC_DHCP_MAX="253"
|
||||
LXC_IPV6_ADDR="fc16::216:3eff:fe00:1"
|
||||
LXC_IPV6_MASK="64"
|
||||
LXC_IPV6_NETWORK="fc16::/64"
|
||||
LXC_IPV6_NAT="true"
|
||||
```
|
||||
|
||||
#### Disk partitioning
|
||||
|
||||
- First disk
|
||||
- OS
|
||||
- a partition configured with DRBD for precious data mounted on /var/lib/lxc
|
||||
- Second disk
|
||||
- non precious data such as the LXC containers with runners.
|
||||
|
||||
#### Root filesystem backups
|
||||
|
||||
- `hetzner03:/etc/cron.daily/backup-hetzner02`
|
||||
`rsync -aHS --delete-excluded --delete --numeric-ids --exclude /proc --exclude /dev --exclude /sys --exclude /srv --exclude /var/lib/lxc 10.53.100.2:/ /srv/backups/hetzner02/`
|
||||
- `hetzner02:/etc/cron.daily/backup-hetzner03`
|
||||
`rsync -aHS --delete-excluded --delete --numeric-ids --exclude /proc --exclude /dev --exclude /sys --exclude /srv --exclude /var/lib/lxc 10.53.100.3:/ /srv/backups/hetzner03/`
|
||||
|
||||
#### Public IP addresses
|
||||
|
||||
The public IP addresses attached to the hosts are not failover IPs that can be moved from one host to the next.
|
||||
The DNS entry needs to be updated if the primary hosts changes.
|
||||
|
||||
When additional IP addresses are attached to the server, they are added to `/etc/network/interfaces` like
|
||||
ipv4 65.21.67.71 and ipv6 2a01:4f9:3081:51ec::102 below.
|
||||
65.21.67.71 and 2a01:4f9:3081:51ec::102 below.
|
||||
|
||||
```
|
||||
auto enp5s0
|
||||
|
@ -472,13 +258,56 @@ add chain ip code prerouting {
|
|||
|
||||
with `nft -f /root/code.nftables`.
|
||||
|
||||
#### Reverse proxy
|
||||
|
||||
The reverse proxy forwards to the designated LXC container with
|
||||
something like the following in
|
||||
`/etc/nginx/sites-enabled/code.forgejo.org`, where 10.6.83.195 is the
|
||||
IP allocated to the LXC container running the web service:
|
||||
|
||||
```
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name code.forgejo.org;
|
||||
|
||||
location / {
|
||||
deny 47.76.209.138; # crawler that does not obey robots.txt
|
||||
deny 47.76.99.127; # crawler that does not obey robots.txt
|
||||
proxy_pass http://10.6.83.195:8080;
|
||||
client_max_body_size 2G;
|
||||
#
|
||||
# http://nginx.org/en/docs/http/websocket.html
|
||||
#
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
include proxy_params;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The LE certificate is obtained once and automatically renewed with:
|
||||
|
||||
```
|
||||
sudo certbot -n --agree-tos --email contact@forgejo.org -d code.forgejo.org --nginx
|
||||
```
|
||||
|
||||
#### Containers
|
||||
|
||||
It hosts LXC containers setup with [lxc-helpers](https://code.forgejo.org/forgejo/lxc-helpers/).
|
||||
|
||||
- `fogejo-code` on hetzner02
|
||||
|
||||
Dedicated to https://code.forgejo.org
|
||||
|
||||
- Docker enabled
|
||||
- LXC creation
|
||||
```sh
|
||||
lxc-helpers.sh lxc_container_create --config "docker" forgejo-code
|
||||
lxc-helpers.sh lxc_container_start forgejo-code
|
||||
lxc-helpers.sh lxc_install_docker forgejo-code
|
||||
lxc-helpers.sh lxc_container_user_install forgejo-code $(id -u) $USER
|
||||
```
|
||||
- upgrades checklist:
|
||||
- `ssh -t debian@hetzner02.forgejo.org lxc-helpers.sh lxc_container_run forgejo-code -- sudo --user debian bash`
|
||||
```sh
|
||||
|
@ -499,7 +328,7 @@ with `nft -f /root/code.nftables`.
|
|||
|
||||
Dedicated to https://next.forgejo.org
|
||||
|
||||
- Docker enabled
|
||||
- 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`
|
||||
- When a new major version is published (8.0 for instance) `run-forgejo.sh` must be updated with it
|
||||
- Reset everything
|
||||
|
@ -534,7 +363,7 @@ with `nft -f /root/code.nftables`.
|
|||
|
||||
Dedicated to https://v7.next.forgejo.org
|
||||
|
||||
- Docker enabled
|
||||
- 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
|
||||
|
@ -564,12 +393,6 @@ with `nft -f /root/code.nftables`.
|
|||
|
||||
```
|
||||
|
||||
- `static-pages` on hetzner02
|
||||
|
||||
See [the static pages documenation](../static-pages/) for more information.
|
||||
|
||||
- Unprivileged
|
||||
|
||||
- `runner-forgejo-helm` on hetzner03
|
||||
|
||||
Dedicated to https://codeberg.org/forgejo-contrib/forgejo-helm and running from an ephemeral disk
|
||||
|
@ -595,3 +418,61 @@ Forgejo contributors with SSH access to this machine are:
|
|||
|
||||
- https://codeberg.org/popey
|
||||
- https://codeberg.org/earl-warren
|
||||
|
||||
## Installing Forgejo runners
|
||||
|
||||
### Preparing the LXC hypervisor
|
||||
|
||||
```shell
|
||||
git clone https://code.forgejo.org/forgejo/lxc-helpers/
|
||||
|
||||
lxc-helpers.sh lxc_prepare_environment
|
||||
sudo lxc-helpers.sh lxc_install_lxc_inside 10.120.13
|
||||
```
|
||||
|
||||
### Creating an LXC container
|
||||
|
||||
```shell
|
||||
lxc-helpers.sh lxc_container_create forgejo-runners
|
||||
lxc-helpers.sh lxc_container_start forgejo-runners
|
||||
lxc-helpers.sh lxc_install_docker forgejo-runner
|
||||
lxc-helpers.sh lxc_install_lxc forgejo-runner 10.85.12 fc33
|
||||
lxc-helpers.sh lxc_container_user_install forgejo-runners $(id -u) $USER
|
||||
lxc-helpers.sh lxc_container_run forgejo-runners -- sudo --user debian bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y wget emacs-nox
|
||||
lxc-helpers.sh lxc_prepare_environment
|
||||
sudo wget -O /usr/local/bin/forgejo-runner https://code.forgejo.org/forgejo/runner/releases/download/v3.4.1/forgejo-runner-3.4.1-linux-amd64
|
||||
sudo chmod +x /usr/local/bin/forgejo-runner
|
||||
echo 'export TERM=vt100' >> .bashrc
|
||||
```
|
||||
|
||||
### Creating a runner
|
||||
|
||||
Multiple runners can co-exist on the same machine. To keep things
|
||||
organized they are located in a directory that is the same as the url
|
||||
from which the token is obtained. For instance
|
||||
DIR=codeberg.org/forgejo-integration means that the token was obtained from the
|
||||
https://codeberg.org/forgejo-integration organization.
|
||||
|
||||
If a runner only provides unprivileged docker containers, the labels
|
||||
in `config.yml` should be:
|
||||
`labels: ['docker:docker://node:20-bookworm']`.
|
||||
|
||||
If a runner provides LXC containers and unprivileged docker
|
||||
containers, the labels in `config.yml` should be
|
||||
`labels: ['self-hosted:lxc://debian:bookworm', 'docker:docker://node:20-bookworm']`.
|
||||
|
||||
```shell
|
||||
mkdir -p $DIR ; cd $DIR
|
||||
forgejo-runner generate-config > config.yml
|
||||
## edit config.yml and adjust the `labels:`
|
||||
## Obtain a $TOKEN from https://$DIR
|
||||
forgejo-runner register --no-interactive --token $TOKEN --name runner --instance https://codeberg.org
|
||||
forgejo-runner --config config.yml daemon |& cat -v > runner.log &
|
||||
```
|
||||
|
||||
#### codeberg.org config.yml
|
||||
|
||||
- `fetch_timeout: 30s` # because it can be slow at times
|
||||
- `fetch_interval: 60s` # because there is throttling and 429 replies will mess up the runner
|
||||
|
|
|
@ -16,7 +16,7 @@ development branch as follows:
|
|||
- announce in the chatroom: `@room the translations will be locked for maintenance in about 15 minutes. Make sure you don't try to save a translation when that happens as it will be lost.`
|
||||
- go to the [Weblate repository admin page](https://translate.codeberg.org/projects/forgejo/forgejo/#repository)
|
||||
- click `Commit`. This is done optionally to make tests run before interrupting anyone, to reduce the total maintenance time
|
||||
- post a "Warning" [announcement in Weblate](https://translate.codeberg.org/projects/forgejo/forgejo/#announcement): `The translations will be locked for maintenance soon. Make sure you don't try to save a translation when that happens as it will be lost.`. Make sure to unckeck the notification option.
|
||||
- post an [announcement in Weblate](https://translate.codeberg.org/projects/forgejo/#announcement): `The translations will be locked for maintenance soon. Make sure you don't try to save a translation when that happens as it will be lost.`
|
||||
- wait 15 minutes
|
||||
- click `Lock`
|
||||
- reload the page
|
||||
|
|
|
@ -3,87 +3,72 @@ title: Localization
|
|||
license: 'CC-BY-SA-4.0'
|
||||
---
|
||||
|
||||
Forgejo is translated via Weblate, a libre web-based translation platform.
|
||||
Forgejo is translated via Weblate - libre web-based translation platform.
|
||||
|
||||
## Translating via Weblate
|
||||
|
||||
The Forgejo project's localization project is publicly available via the [Codeberg Translate](https://translate.codeberg.org/projects/forgejo/forgejo/) Weblate instance.
|
||||
The Weblate project of Forgejo localization is publicly available at [Codeberg Translate](https://translate.codeberg.org/projects/forgejo/forgejo/) Weblate instance.
|
||||
|
||||
### Translation guidelines
|
||||
|
||||
1. Only suggest changes that benefit all users of the translation. Please do not suggest changes that will only make the translation better in cases specific to any self-hosted Forgejo instance. Instead customize such instances separately from Forgejo upstream.
|
||||
2. Keep the translation as beginner-friendly as possible.
|
||||
3. Users are not obligated to complete any translation. When unsure about the translation, feel free to leave it for others to translate.
|
||||
1. Please only suggest changes that will benefit all potential users of the translation. Do not suggest changes that will only make the translation better in cases specific to you or your Forgejo instance. Instead you can customize your instance separately from Forgejo upstream.
|
||||
2. Try to keep the translation beginner-friendly.
|
||||
3. Remember that you're not obligated to do the translation. If you're unsure about translation, feel free to leave it for somebody else to translate later.
|
||||
|
||||
### Discovering the translation
|
||||
|
||||
Go to the [Project](https://translate.codeberg.org/projects/forgejo/forgejo/) page for a list of languages that are currently available for translation.
|
||||
Go to the [Project](https://translate.codeberg.org/projects/forgejo/forgejo/) page. You'll see the list of languages that are currently available for translation. Click on your language.
|
||||
|
||||
From the language page it is possible to browse all translation strings, as well as untranslated, unfinished and failing translations.
|
||||
From the language page you can browse all translation strings, as well as untranslated, unfinished and failing ones.
|
||||
|
||||
### Suggesting changes
|
||||
|
||||
Anonymous suggestions for changes and additions to the existing translation can be submitted by finding the string for which to suggest a change, typing the change in, and then clicking "Suggest".
|
||||
|
||||
All suggested change will be checked before being accepted. Since most localization members are likewise volunteers, this can take a while.
|
||||
You can suggest changes and additions to the existing translation anonymously: find the string for which you want to suggest a change, type your change in, and click "Suggest". Your change will be checked before being accepted. Most contributors are volunteers, this can take a while.
|
||||
|
||||
### Making direct changes, accepting suggestions
|
||||
|
||||
Direct changes require a [Codeberg](https://codeberg.org/) account which can be used to access the [Codeberg Translate](https://translate.codeberg.org/) account.
|
||||
Making direct changes requires a [Codeberg](https://codeberg.org/) account. Use it to log into [Codeberg Translate](https://translate.codeberg.org/).
|
||||
|
||||
If the translation is not approved it is possible to edit the string again and use the "Save" button to save the change. Existing suggestions can either be applied, or rejected by optionally specifying the rejection reason.
|
||||
If the string is not translated or approved, you can edit it and use the "Save" button to save the change. You can also apply existing suggestions by clicking the checkmark icon, or reject, optionally specifying the rejection reason.
|
||||
|
||||
Once the string is translated and approved it can only be changed by a Forgejo **Localization Team** member, though everyone else is still able suggest changes.
|
||||
If the string is translated and approved, it can only be changed by a Forgejo Localization team member, but everyone else is still able suggest changes.
|
||||
|
||||
To protect the existing translations from vandalism, all strings imported from Gitea were automatically marked as approved.
|
||||
|
||||
### Adding a new language
|
||||
|
||||
If your language is not available in the language list it must be added first before translating.
|
||||
If your language is not available in the language list, you must add first it before translating.
|
||||
|
||||
To add a new language, go to the [page for starting new translation](https://translate.codeberg.org/new-lang/forgejo/forgejo/), select a language and click "Start new translation".
|
||||
To add a new language, go to the [page for starting new translation](https://translate.codeberg.org/new-lang/forgejo/forgejo/), select your language and click "Start new translation".
|
||||
|
||||
### E-mail privacy
|
||||
|
||||
By default, Weblate will use an accounts primary e-mail address for all contributions. If you want to adjust this behavior go to [Weblate settings - Account](https://translate.codeberg.org/accounts/profile/#account) and select a different e-mail under "Commit e-mail" section. Select `@users.noreply.translate.codeberg.org` address to avoid using a unmasked e-mail address.
|
||||
By default, Weblate will use your primary e-mail address for your contributions. If you want to adjust this behavior, go to [Weblate settings - Account](https://translate.codeberg.org/accounts/profile/#account) and select a different e-mail under "Commit e-mail" section. You can select `@users.noreply.translate.codeberg.org` address to avoid using any real e-mail address.
|
||||
|
||||
## Joining the Localization team
|
||||
|
||||
If you want to be more involved in maintaining the translation - consider becoming a part of the Localization team.
|
||||
|
||||
In order to apply to the team you must open a new issue at [forgejo/governance](https://codeberg.org/forgejo/governance) repository. See [previous applications](https://codeberg.org/forgejo/governance/issues?q=application+to+the+localization+team&state=closed) for inspiration.
|
||||
|
||||
In your application message, please include:
|
||||
|
||||
- your motivation for becoming a member
|
||||
- your experience at translating other projects and using Weblate. e.g. link(s) to your public translation profile(s) or contributions
|
||||
|
||||
Application process takes 2 weeks or more. However, it doesn't prevent you from working on the translation: you can add suggestions which you will be able accept later being a team member, translate new strings, add comments and discuss the translation.
|
||||
|
||||
It is a good idea to work on the translation first for a bit, before applying to the Localization team, to see how the workflow looks like.
|
||||
|
||||
Please apply to the team only if you want your actions as a team member to be beneficial to all translation users.
|
||||
|
||||
## Discussing the translation
|
||||
|
||||
To ask questions, clarify string meaning, report vandalism or suggest changes to source strings post in [Matrix room](https://matrix.to/#/#forgejo-localization:matrix.org) or [issues](https://codeberg.org/forgejo/forgejo/issues). Doing this is not restricted to members of the **Localization Team**.
|
||||
|
||||
## Joining the Localization Team
|
||||
|
||||
Any [Codeberg Translate](https://translate.codeberg.org) user is able to suggest translations, translate new strings, add comments and discuss existing translations with our **Localization Team**.
|
||||
|
||||
If you would like to maintain the translation, join the **Localization Team** as a member by sending us an application.
|
||||
|
||||
However, before doing that, we recommend working on translations independently before applying. This allows time to get used to the workflow and collaborating within the **Localization Team**. Members are able to accept their own suggestions.
|
||||
|
||||
### Applying
|
||||
|
||||
In order to become a member of the team apply by opening a new issue at [forgejo/governance](https://codeberg.org/forgejo/governance) repository. See [previous applications](https://codeberg.org/forgejo/governance/issues?q=application+to+the+localization+team&state=closed) for inspiration.
|
||||
|
||||
In the application message, state the following:
|
||||
|
||||
- Motivation for becoming a member.
|
||||
- Experience translating other projects and using Weblate. E.g. link(s) to public translation profile(s) or contribution(s).
|
||||
|
||||
The application process will take approximately two (2) weeks (or more) to complete.
|
||||
|
||||
### Responsibilities
|
||||
|
||||
Becoming a part of any of our team comes with a couple of responsibilities:
|
||||
|
||||
- Members must act in accordance to the [Code of Conduct](https://codeberg.org/forgejo/code-of-conduct).
|
||||
- Members must act in accordance to all other rules and process that Forgejo agrees on through [its decision making process](https://codeberg.org/forgejo-contrib/governance/src/branch/main/DECISION-MAKING.md).
|
||||
|
||||
Translations should aim to target people of different backgrounds across all reasonable end user locales.
|
||||
|
||||
Since text is highly subjective, this is simply a goal that should be striven for and not a measurable requirement. Remain receptive to creative feedback from the **Localization Team** members.
|
||||
Ask questions, clarify string meaning, report vandalism and suggest changes to source strings in [Matrix room](https://matrix.to/#/#forgejo-localization:matrix.org) or [issues](https://codeberg.org/forgejo/forgejo/issues). For this you don't need to be a member of the Localization team.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
When having problems using Weblate, there are multiple support channels available:
|
||||
If you have problems using Weblate, there are multiple support channels available:
|
||||
|
||||
- [Weblate documentation](https://docs.weblate.org)
|
||||
- [Weblate issues](https://github.com/WeblateOrg/weblate/issues)
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
---
|
||||
title: Static pages
|
||||
license: 'CC-BY-SA-4.0'
|
||||
---
|
||||
|
||||
LXC container dedicated to hosting static HTML pages.
|
||||
|
||||
# LXC container
|
||||
|
||||
See the [static-pages section in the infrastructure documentation](../infrastructure/).
|
||||
|
||||
# SSL on the LXC host
|
||||
|
||||
Each domain has a `/etc/nginx/sites-available/f3.forgefriends.forgejo.org` file similar to the following
|
||||
on the host where the LXC container resides.
|
||||
|
||||
```nginx
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name f3.forgefriends.forgejo.org;
|
||||
|
||||
location / {
|
||||
proxy_pass http://10.6.83.106:80;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Obtain the certificate:
|
||||
|
||||
```sh
|
||||
ln -sf /etc/nginx/sites-available/f3.forgefriends.forgejo.org /etc/nginx/sites-enabled/f3.forgefriends.forgejo.org
|
||||
sudo certbot -n --agree-tos --email contact@forgejo.org -d f3.forgefriends.forgejo.org --nginx
|
||||
```
|
||||
|
||||
# Creation in the LXC container
|
||||
|
||||
With the example of `f3.forgefriends.forgejo.org` and
|
||||
`f3.forgefriends.org` serving the same content.
|
||||
|
||||
## login
|
||||
|
||||
From the LXC host:
|
||||
|
||||
```sh
|
||||
lxc-helpers.sh lxc_container_run static-pages -- sudo --user $USER bash
|
||||
```
|
||||
|
||||
## nginx
|
||||
|
||||
```
|
||||
$ cat /etc/nginx/sites-enabled/f3.forgefriends.org
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name f3.forgefriends.org f3.forgefriends.forgejo.org;
|
||||
|
||||
root /var/www/f3.forgefriends.org;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## clone
|
||||
|
||||
```sh
|
||||
git clone https://code.forgejo.org/f3/html-documentation /var/www/f3.forgefriends.org
|
||||
```
|
||||
|
||||
# Update in the LXC container
|
||||
|
||||
## Webhook
|
||||
|
||||
Create a `POST` webhook with the URL `https://f3.forgefriends.forgejo.org/.well-known/forgejo/f3.forgefriends.org` on https://code.forgejo.org/f3/html-documentation. It is expected to fail with 404, the information will be extracted from the web server logs.
|
||||
|
||||
To verify that it works:
|
||||
|
||||
- `journalctl -f --unit static-pages`
|
||||
- `Test delivery` at https://code.forgejo.org/f3/html-documentation/settings/hooks/4
|
||||
|
||||
## Service
|
||||
|
||||
### git pull on change
|
||||
|
||||
```sh
|
||||
$ cat /usr/local/bin/static-pages.sh
|
||||
#!/bin/bash
|
||||
|
||||
sudo tail -f /var/log/nginx/access.log | sed --silent --regexp-extended --unbuffered --expression 's|.*.well-known/forgejo/([^ /]+) .*|\1|p' | while read server ; do
|
||||
d="/var/www/$server"
|
||||
if test -d "$d" ; then
|
||||
echo "update $server"
|
||||
cd "$d"
|
||||
git pull
|
||||
else
|
||||
echo "unknown server $server"
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
### service
|
||||
|
||||
```sh
|
||||
$ cat /etc/systemd/system/static-pages.service
|
||||
[Unit]
|
||||
Description=Static pages
|
||||
|
||||
[Service]
|
||||
User=debian
|
||||
ExecStart=/usr/local/bin/static-pages.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
$ sudo systemctl enable static-pages
|
||||
```
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: 'Forgejo prerelease documentation'
|
||||
title: 'Forgejo v7.0 documentation'
|
||||
---
|
||||
|
||||
- [What is Forgejo?](/)
|
||||
|
|
|
@ -22,4 +22,4 @@ licensed under [multiple licenses](https://fontawesome.com/license/free).
|
|||
|
||||
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.
|
||||
|
||||
"Knut the Polar Bear" has been derived from [Polar bear remix](https://web.archive.org/web/20240318012628if_/https://openclipart.org/detail/193243/polar-bear-remix), under CC0 1.0
|
||||
"Knut the Polar Bear" has been derived from https://openclipart.org/detail/193243/polar-bear-remix, under CC0 1.0
|
||||
|
|
|
@ -166,11 +166,8 @@ by using the https://code.forgejo.org/actions/cache action.
|
|||
There is no guarantee that the cache is populated, even when two `jobs`
|
||||
run in sequence. It is not a substitute for `artifacts`.
|
||||
|
||||
See also the [set of examples](https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-cache/.forgejo/workflows/).
|
||||
|
||||
> **NOTE:** [actions/cache](https://code.forgejo.org/actions/cache) will us `zstd` if present when compressing files to be sent to the cache. It is faster than the default compression.
|
||||
|
||||
> **NOTE:** if the runner is not configured to provide a cache, [actions/cache](https://code.forgejo.org/actions/cache) will fail with the following error: `Cache action is only supported on GHES version >= 3.5`.
|
||||
Note that [actions/cache](https://code.forgejo.org/actions/cache) has `zstd`
|
||||
as a dependency for creating tar archives in the runner.
|
||||
|
||||
## Auto cancellation of workflows
|
||||
|
||||
|
@ -179,7 +176,7 @@ triggered by parent commits are canceled.
|
|||
|
||||
## Services
|
||||
|
||||
PostgreSQL, Redis and other services can be run from container images with something similar to the following. See also the [set of examples](https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-service/.forgejo/workflows/).
|
||||
PostgreSQL, redis and other services can be run from container images with something similar to the following. See also the [set of examples](https://code.forgejo.org/forgejo/end-to-end/src/branch/main/actions/example-service/.forgejo/workflows/).
|
||||
|
||||
```yaml
|
||||
services:
|
||||
|
|
|
@ -7,18 +7,10 @@ Forgejo supports code search through an indexer and `git-grep` as a fallback whe
|
|||
|
||||
# Basic (git-grep)
|
||||
|
||||
![Code search results page using git-grep](../_images/user/code-search/gitgrep.png)
|
||||
|
||||
If `REPO_INDEXER_ENABLED` is set to `false`, the code search function will be limited to a single repository and will use [`git-grep`](https://git-scm.com/docs/git-grep).
|
||||
|
||||
Currently, only fixed strings are supported and any case differences are ignored. The search results will include the matched line, along with a single line before and after the match.
|
||||
|
||||
Since, the searches are performed in the fly they may be performed on any valid branch or tag.
|
||||
Currently, only fixed strings are supported and any case differences are ignored. The search results will include the matched line, along with a context of three lines before and after the match. The search query will be executed on the default branch of the repository.
|
||||
|
||||
# Indexer
|
||||
|
||||
![Code search results page using indexer](../_images/user/code-search/indexer.png)
|
||||
|
||||
For advanced search queries and searching across an entire organisation or instance, `REPO_INDEXER_ENABLED: true` enables code search via bleve/elasticsearch.
|
||||
|
||||
However, search results are limited to the HEAD of the repository.
|
||||
|
|
|
@ -27,7 +27,7 @@ In the section “Manage Email Addresses”, you can select one of the following
|
|||
When you're finished, press the button “Set Email Preference” to confirm your selection.
|
||||
|
||||
> **Note:**
|
||||
> Disabling email notifications doesn't mean that you'll stop receiving important messages from the Forgejo organization.
|
||||
> Disabling email notifications doesn't mean that you'll stop receiving important messages from the Forgejo organisation.
|
||||
|
||||
## Issue notifications
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Here's an explanation of the form's fields:
|
|||
- **Description** A short description that appears next to your repository's name where appropriate
|
||||
- **Template** Occasionally you may want to generate your repository from an existing template. In that case, you can specify that template here. Otherwise, simply leave this field empty.
|
||||
- **Issue Labels** If you want to initialize your project's issue tracker with a set of labels that you can use to categorize issues, you can choose one here. You don't have to choose this right away though, as you can choose and modify issue labels at a later time as well.
|
||||
- **.gitignore** A [.gitignore](https://git-scm.com/docs/gitignore) file defines which files Git should not keep track of. This is useful, for example to prevent configuration files or binaries to be tracked in version control. You can choose to add a predefined file matching the programming language you use now, or add one manually later.
|
||||
- **.gitignore** A [.gitignore](https://git-scm.com/docs/gitignore) file defines which files Git should not keep track of. This is useful, for example to prevent configuration files or binaries to be tracked in version control. You can choose to add a pre-defined file matching the programming language you use now, or add one manually later.
|
||||
- **License** Here, you can choose from a list of FSF/OSI approved licenses. A `LICENSE` file will then be added to the repository. For some help on choosing the correct license, have a look at our [licensing article](/getting-started/licensing/).
|
||||
- **README** is the first file one should read when accessing a repository. It's also the first file displayed when accessing a repository, a bit like the "homepage" of your repository. On Forgejo, this is interpreted as a [Markdown](/markdown/) file.
|
||||
- **Initialize repository** In order to add the `LICENSE`, `README` and `.gitignore` files mentioned above to your new repository, make sure you tick this box.
|
||||
|
@ -40,7 +40,7 @@ After filling out the fields, click the green "Create Repository" button on the
|
|||
|
||||
You should now see a screen similar to the one below. If you haven't chosen to generate `LICENSE`, `README` and `.gitignore` the screen might show instructions instead, which will vanish after [your first commit](#making-your-first-commit/).
|
||||
|
||||
![screenshot showing a freshly baked repository](../_images/user/first-repository/create-repo-3.png)
|
||||
![screenshot showing a freshly baken repository](../_images/user/first-repository/create-repo-3.png)
|
||||
|
||||
Here's what the most important buttons do:
|
||||
|
||||
|
@ -136,7 +136,7 @@ When you clone a repository from the Internet, the URL that you got your copy of
|
|||
If your local copy of the repository is missing some commits that exist in the remote repository, pushing will result in an error. There are two ways to fix this:
|
||||
|
||||
- Run `git pull` to combine your local changes with the changes that exist in the remote repository. If this does not work, please follow the instructions in your terminal.
|
||||
- If you know what you are doing, you can also overwrite the remote repository using `git -f push`.
|
||||
- If you know what you are doing, you can also overwrite the remote repository uaing `git -f push`.
|
||||
This action will **permanently** alter your remote repository and is not suitable if you are working on a project together with other people.
|
||||
|
||||
## Making your first commit
|
||||
|
|
|
@ -32,7 +32,7 @@ While some of the categories are rather straightforward, a little explanation ab
|
|||
|
||||
**Dotfiles** are files whose name starts with a dot, which by convention, suggests they should be hidden, and as such, they are excluded from language statistics.
|
||||
|
||||
**Programming languages** and **Markup languages** are more or less self explanatory. The former category includes languages like C, Go, Rust, JavaScript, and many, many others. Markup languages are CSS, HTML, Jinja templates, Jupyter Notebooks, and numerous other formats.
|
||||
**Programming languages** and **Markup languages** are more or less self explanatory. The former category includes languages like C, Go, Rust, JavaScript, and many, many others. Markup languages are CSS, HTML, Jinja templates, Jupyter Notebooks, and numeruous other formats.
|
||||
|
||||
Please consult the [enry][enry] or [linguist][linguist] documentation for more details.
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ Forgejo token scopes are as follows:
|
|||
| **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. |
|
||||
| **write:notification** | Grants read/write/delete access to user notifications, such as marking notifications as read. |
|
||||
| **organization** | `orgs/*` and `teams/*` API routes: Organization and team management operations. |
|
||||
| **read:organization** | Grants read access to org and team status, such as listing all organizations a user has visibility to, teams, and team members. |
|
||||
| **read:organization** | Grants read access to org and team status, such as listing all orgs a user has visibility to, teams, and team members. |
|
||||
| **write:organization** | Grants read/write/delete access to org and team status, such as creating and updating teams and updating org settings. |
|
||||
| **package** | `/packages/*` API routes: Packages operations |
|
||||
| **read:package** | Grants read access to package operations, such as reading and downloading available packages. |
|
||||
|
@ -39,5 +39,5 @@ Forgejo token scopes are as follows:
|
|||
| **read:repository** | Grants read access to repository operations, such as getting repository files, releases, collaborators. |
|
||||
| **write:repository** | Grants read/write/delete access to repository operations, such as getting updating repository files, creating pull requests, updating collaborators. |
|
||||
| **user** | `/user/*` and `/users/*` API routes: User-related operations. |
|
||||
| **read:user** | Grants read access to user operations, such as getting user repository subscriptions and user settings. |
|
||||
| **write:user** | Grants read/write/delete access to user operations, such as updating user repository subscriptions, followed users, and user settings. |
|
||||
| **read:user** | Grants read access to user operations, such as getting user repo subscriptions and user settings. |
|
||||
| **write:user** | Grants read/write/delete access to user operations, such as updating user repo subscriptions, followed users, and user settings. |
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
no_progress = true
|
||||
output = "report.md"
|
||||
cache = true
|
||||
accept = ["200", "429"]
|
||||
scheme = ["https","http"]
|
||||
skip_missing = false
|
||||
include_verbatim = false
|
||||
exclude = ['^https://forgejo\.octopuce\.forgejo\.org','http://private.forgejo.org', 'https://codeberg.org/forgejo/forgejo/vX.Y/forgejo']
|
||||
exclude_all_private = true
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -ex
|
||||
|
||||
: ${FORGEJO:=/tmp/forgejo-binary}
|
||||
|
||||
|
@ -17,7 +17,7 @@ function latest() {
|
|||
if test "$major" = "next" ; then
|
||||
select="" # this will pick whatever is the highest numbered release
|
||||
else
|
||||
select="$major"
|
||||
select="$major-test"
|
||||
fi
|
||||
curl -sS https://codeberg.org/api/v1/repos/forgejo-experimental/forgejo/releases | jq -r '.[] | .tag_name | select(startswith("'$select'"))' | sort --reverse --version-sort | head -1
|
||||
}
|
||||
|
@ -79,7 +79,6 @@ function generate() {
|
|||
section "###" "forgejo-cli actions generate-runner-token"
|
||||
section "###" "forgejo-cli actions generate-secret"
|
||||
section "###" "forgejo-cli actions register"
|
||||
section "###" "forgejo-cli f3"
|
||||
|
||||
section "##" "web"
|
||||
|
||||
|
|
Loading…
Reference in a new issue