Compare commits

..

70 commits

Author SHA1 Message Date
323551764d user: issue-tracking-basics: correct some parts
(cherry picked from commit b2c12f3897)
2024-06-22 20:04:35 +00:00
855730b87d user: issue-tracking-basics: update screenshot (#716)
Updates the screenshot in the issue tracking basics page, as it looks very dated (even shows the old Codeberg logo)

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/716
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Ikuyo Kita <kitakita@disroot.org>
Co-committed-by: Ikuyo Kita <kitakita@disroot.org>
(cherry picked from commit 982e8fd215)
2024-06-16 13:47:53 +00:00
0ko
47d3bbbd3d developer: corrections for base localization management
(cherry picked from commit edd4728e04)
2024-06-15 04:55:52 +00:00
864582f6d0 user: first-repository: update screenshots and content
(cherry picked from commit 7c3b81ec99)
2024-06-14 08:56:52 +00:00
9pfs
1e129c800f Fix typo (bookwork -> bookworm)
(cherry picked from commit b362696091)
2024-06-14 04:44:52 +00:00
ed3267dad6 user: oauth2: illustrated example to add an authentication source (#703)
Preview: https://forgejo.codeberg.page/@docs_pull_703/docs/next/user/oauth2-provider/#using-a-codeberg-as-an-authentication-source
Reviewed-on: https://codeberg.org/forgejo/docs/pulls/703
Reviewed-by: twenty-panda <twenty-panda@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
(cherry picked from commit 11859284af)
2024-06-13 15:34:53 +00:00
1952be7409 admin: storage: add missing MINIO_CHECKSUM_ALGORITHM setting
Fixes: https://codeberg.org/forgejo/forgejo/issues/4103
(cherry picked from commit 16834531f1)
2024-06-11 17:17:22 +00:00
Kevin P. Fleming
789c2bee74 Add a note about SAME_SITE in the oauth2_client docs. 2024-06-10 17:26:59 -04:00
0707a28ebf developer: dependencies: do not require a label for each dependency
it is extra work and does not provide anything searching for past pull
requests with the same title would not.

(cherry picked from commit 444cba3f20)
2024-06-09 07:12:22 +00:00
c4f955c4d8 developer: dependencies: how to tune software upgrades
(cherry picked from commit da4e314547)
2024-06-08 07:59:22 +00:00
02ee40e027 add example config for neovim
(cherry picked from commit 0222f4a502)
2024-06-08 07:50:22 +00:00
7d5578e16e user: actions: document the default for shell
`jobs.<job_id>.steps[*].shell` defaults to `bash` unless
`jobs.<job_id>.container.image` is specified in which case it defaults
to `sh`.

Refs: https://code.forgejo.org/forgejo/runner/issues/150
(cherry picked from commit 6fa1c28677)
2024-06-08 04:59:22 +00:00
d622bf1505 Updates whitelist to allowlist
(cherry picked from commit c86099d84e)
2024-06-02 06:35:43 +00:00
Abdur-Rahman Mansoor
ae1297960c style: fix more typos in /docs/admin
(cherry picked from commit f2e3723bd3)
2024-06-01 14:11:19 +00:00
dc90b37d8c Fixes broken links (#675)
Preview: https://forgejo.codeberg.page/@docs_pull_675/docs/next/user/first-repository/

Redirect links as reported:

https://codeberg.org/forgejo/docs/issues/674
https://codeberg.org/forgejo/docs/issues/673
Reviewed-on: https://codeberg.org/forgejo/docs/pulls/675
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: adagio <h759bkyo4@mozmail.com>
Co-committed-by: adagio <h759bkyo4@mozmail.com>
(cherry picked from commit 8ba517004d)
2024-05-31 11:53:02 +00:00
99d49d3365 Modifies and reformats actions.md glossary (#630)
Adds contents to the glossary section of the `actions.md` file.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/630
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: adagio <h759bkyo4@mozmail.com>
Co-committed-by: adagio <h759bkyo4@mozmail.com>
(cherry picked from commit d141e54597)
2024-05-30 06:15:03 +00:00
Abdur-Rahman Mansoor
05ce897d18 style: fix lots of typos in installation-binary.md
(cherry picked from commit c37e8619d6)
2024-05-30 05:08:02 +00:00
8155e636d1 user: actions: indent issue
(cherry picked from commit 6b6f79e6ff)
2024-05-28 21:00:14 +00:00
12a19985bb Adds consistency to sentence formatting in seek-assistance.md (#633)
Places `.` symbol at the end of a couple of list sentences.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/633
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: adagio <h759bkyo4@mozmail.com>
Co-committed-by: adagio <h759bkyo4@mozmail.com>
(cherry picked from commit 9326746c38)
2024-05-28 10:56:06 +00:00
Abdur-Rahman Mansoor
df152d4182 style: fix typos in /docs/admin (#656)
Now that I've finished `/docs/user`  I suppose I will start working on `/docs/admin`. I didn't change all the files at once since I thought it would be annoying for the maintainers to review. If you prefer I make all the changes at once, feel free to let me know and I would be happy to do that as well. :)

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/656
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Reviewed-by: Caesar Schinas <caesar@caesarschinas.com>
Co-authored-by: Abdur-Rahman Mansoor <armansoor@missingno.dev>
Co-committed-by: Abdur-Rahman Mansoor <armansoor@missingno.dev>
(cherry picked from commit d35b4548d1)
2024-05-27 23:56:12 +00:00
Schiriki
3326ca60d7 Replace gitea through forgejo
(cherry picked from commit c46f6bc4af)
2024-05-27 23:43:06 +00:00
Abdur-Rahman Mansoor
ddf959a475 style: fix more typos in /docs/user
(cherry picked from commit ed5886012a)
2024-05-26 10:50:06 +00:00
d0666b1bfd
v7.0.3 is greater than v7.0-test 2024-05-26 12:30:20 +02:00
8371da465f admin: command-line: update
scripts/cli-docs.sh run next > docs/admin/command-line.md

(cherry picked from commit 518407ccfe)
2024-05-26 10:08:06 +00:00
a83274e296 admin: installation: rootless data is in /var/lib/gitea by default
Refs: https://codeberg.org/forgejo/forgejo/issues/3869
(cherry picked from commit dc67b3c83a)
2024-05-25 12:34:57 +00:00
8c651a91c7 Add guide to set branch to push to AGit pull request by default
(cherry picked from commit 5c634782b9)
2024-05-25 11:43:57 +00:00
e564335324 Docker installation detail fixes (#643)
Updates and fixes version descriptions for the latest Forgejo Docker image.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/643
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: adbagio <h759bkyo4@mozmail.com>
Co-committed-by: adbagio <h759bkyo4@mozmail.com>
(cherry picked from commit cd43c8b018)
2024-05-24 07:55:49 +00:00
4609582481 fix: SHOW_FOOTER_POWERED_BY is not available in v7.0 2024-05-22 14:27:00 +00:00
Victoria Nadasdi
b3a86302e2
add missing opts from v7.0.3
The week 2024-20-v7.0 cherry pick PR (#3772) added a fix that added a
new type option on the cli: "Fix missing migrate actions artifacts".

https://codeberg.org/forgejo/forgejo/src/branch/v7.0/forgejo/cmd/migrate_storage.go#L37

References:
- https://codeberg.org/forgejo/forgejo/pulls/3772
- https://codeberg.org/forgejo/forgejo/src/branch/v7.0/forgejo/cmd/migrate_storage.go#L37
2024-05-22 15:39:33 +02:00
Victoria Nadasdi
9a82bf41bc
fix: pin node packageManager
As packageManager is not pinned, `pnpm install --frozen-lockfile` will
install the latest version and adds it to the `package.json` file.

That makes PR checks fail because it checks if there are any changes
(`diff`) in the working directory as a step.
2024-05-22 15:06:57 +02:00
b630aedee0 developer: dependency: release notes example
(cherry picked from commit 8a28a4db15)
2024-05-16 21:15:24 +00:00
e2bd7bc8a6 developer: compiling requires go v1.22 not v1.21
(cherry picked from commit a09cea8876)
2024-05-16 21:11:09 +00:00
Crown0815
034a105374 Fix incorrect default value in CheatSheet for attachment MaxSize
I tested my forgejo instance and it says that it cannot upload files larger than 2048 MB.
I also confirmed on the gitea cheatsheet where the value is also 2048 MB
(see https://docs.gitea.com/administration/config-cheat-sheet#issue-and-pull-request-attachments-attachment)

(cherry picked from commit 720667cf04)
2024-05-16 21:07:36 +00:00
e619200f52 adds and updates hierarchy section
(cherry picked from commit f5b51da942)
2024-05-16 08:01:45 +00:00
0ko
8199991118 Localization: add instructions for fixing various failures with Weblate CL
(cherry picked from commit fb73fd507d)
2024-05-15 03:52:57 +00:00
922d9a91a3 Add Caddy config to reverse proxy section (#605)
Added Caddy example configs, turned on syntax highlighting in nginx/apache

Closes: forgejo/website#232
Reviewed-on: https://codeberg.org/forgejo/docs/pulls/605
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: TheFox0x7 <thefox0x7@gmail.com>
Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
(cherry picked from commit b6b99c0b55)
2024-05-14 23:08:12 +00:00
61beb1afcc Updates Contributing section of the README (#611)
Adds content to the Contributing section of the README.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/611
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Co-authored-by: adbagio <h759bkyo4@mozmail.com>
Co-committed-by: adbagio <h759bkyo4@mozmail.com>
(cherry picked from commit a9beec6523)
2024-05-13 10:29:47 +00:00
jwildeboer
264447c0f1 Update Issue/PR Template doc (#609)
Preview: https://forgejo.codeberg.page/@docs_pull_609/docs/next/user/issue-pull-request-templates/#directory-names

Proposal based on https://codeberg.org/forgejo/docs/issues/607 to make the docs more readable and add the `.forgejo` directory. Also added the `ref` and `labels` options to the yaml example.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/609
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: jwildeboer <jwildeboer@noreply.codeberg.org>
Co-committed-by: jwildeboer <jwildeboer@noreply.codeberg.org>
(cherry picked from commit 784e395e97)
2024-05-12 18:43:47 +00:00
f0f8322943 admin(actions): the latest stable runner is 3.4.1
(cherry picked from commit 359caf8476)
2024-05-12 14:29:00 +00:00
Kwonunn
4db9cb08cd Reverse Proxy setup guide (#600)
I've added a more comprehensive guide to set up Reverse Proxies.

So far I've added nginx configuration, I'm also planning to add apache configuration later on.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/600
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Kwonunn <kwonunnx@gmail.com>
Co-committed-by: Kwonunn <kwonunnx@gmail.com>
(cherry picked from commit c1b7969c1d)
2024-05-10 07:25:23 +00:00
cascading-pr
adec18c29d
cascading-pr update
(cherry picked from commit 42d4eeb926)
2024-05-10 08:38:57 +02:00
cascading-pr
b0e096dbaa
cascading-pr update
(cherry picked from commit ef11b41eb5)
2024-05-10 08:38:49 +02:00
faf25f747f developer(infrastructure): ubuntu-runner.forgejo.org
(cherry picked from commit 38c90ce5d6)
2024-05-07 13:00:25 +00:00
89966a10a5 developer: release: cut the documentation branch
- add a checklist to the release instructions
- use a pattern for push instead of an explicit list of branches
  it was previously advisable to avoid conflicts when there was
  no automated backports but it is no longer necessary

(cherry picked from commit 5acda1e0b2)
2024-05-07 10:56:17 +00:00
Yaroslav Halchenko
48ca2baa98 Add codespell support (without CI) and make it fix some typos (#536)
Per "request" of @0ko in https://codeberg.org/forgejo/forgejo/pulls/3270#issuecomment-1774032

TODOs
- postponed: how to add codespell (written in Python) to CI -- separate workflow? add to some other step? to some other tool/specification?

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/536
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Yaroslav Halchenko <debian@onerussian.com>
Co-committed-by: Yaroslav Halchenko <debian@onerussian.com>
(cherry picked from commit 9ad5f2ab0f)
2024-05-05 15:01:18 +00:00
0ko
537746e8a9 Fix dead links
(cherry picked from commit 4cba3d36b3)
2024-05-05 06:20:28 +00:00
OniriCorpe
2fd68bd1c2 Fix the 'Forgejo numbering scheme' link
(cherry picked from commit cd06bf37c5)
2024-05-03 08:48:54 +00:00
alydev
96c561f09f SSL note for minio storage, fixed dead link
(cherry picked from commit 0bfc31bd0a)
2024-05-01 11:36:47 +00:00
Earl Warren
1280915ffa Merge pull request '[Backport v7.0] Revert "Add rootless installation instructions"' (#574) from backport/v7.0/pr-573 into v7.0
Reviewed-on: https://codeberg.org/forgejo/docs/pulls/574
Reviewed-by: crystal <crystal@noreply.codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-28 21:10:45 +00:00
Earl Warren
88a8a9f734 Merge pull request '[Backport v7.0] admin: upgrade: drop issue.created when upgrading from gogs' (#575) from backport/v7.0/pr-567 into v7.0
Reviewed-on: https://codeberg.org/forgejo/docs/pulls/575
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
2024-04-28 20:44:58 +00:00
07865ed7ff admin: upgrade: drop issue.created when upgrading from gogs
Refs: https://codeberg.org/forgejo/forgejo/issues/3488
(cherry picked from commit d9c4a8bd18)
2024-04-28 20:39:12 +00:00
680cdd34b1 Revert "Add rootless installation instructions"
This reverts commit 345765e21f.

(cherry picked from commit bea94cd9bd)
2024-04-28 20:38:10 +00:00
Firepup650
b08aaf57c8 Fix a broken link
`[clean up job]../../admin/config-cheat-sheet/#cron---cleanup-expired-packages-croncleanup_packages)` -> `[clean up job](../../admin/config-cheat-sheet/#cron---cleanup-expired-packages-croncleanup_packages)`

(cherry picked from commit a1106f2fce)
2024-04-28 16:14:10 +00:00
Robin Kloppe
d39405ea95 Added Repo Mirros (#568)
In a next step https://codeberg.org/forgejo/forgejo/pulls/3503 can be merged

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/568
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
Co-authored-by: Robin Kloppe <git@mainboarder.de>
Co-committed-by: Robin Kloppe <git@mainboarder.de>
(cherry picked from commit d9db0d13f6)
2024-04-28 08:59:42 +00:00
0ko
81c31abdd5 localization admin: add Weblate announcement
(cherry picked from commit bcd7348a70)
2024-04-24 15:29:23 +00:00
7acc15dbca LTS: is not part of the metadata & CLI updates (#561)
- LTS are listed in the table, no hint in the version number
- update the RC release names
- CLI updates

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/561
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
(cherry picked from commit a0477a8300)
2024-04-23 15:59:39 +00:00
845378b29d docs: user: new section on comment on issues & PR via email
(cherry picked from commit cd3c76c05d)
2024-04-23 09:05:35 +00:00
f89d4d568d sync with Gitea e865de1e9d65dc09797d165a51c8e705d2a86030
cd docs
git diff d3982bcd814bac93e3cbce1c7eb749b17e413fbd..e865de1e9d65dc09797d165a51c8e705d2a86030 -- $(find . -type f -name '*en-us*')

(cherry picked from commit 6aa9b491a0)
2024-04-23 07:16:28 +00:00
f0b99af484
admin: cli: update 2024-04-23 07:19:30 +02:00
88bd56c31c meta: pnpm has a new format for lockfiles
Seem to be better to upgrade despite it being very new rather than
to pin pnpm.

(cherry picked from commit 88ea9f3a24)
2024-04-22 23:36:02 +00:00
Otto Richter
c06d726ecf Sync list of default themes
See https://codeberg.org/forgejo/forgejo/pulls/1746

(cherry picked from commit 7c8c649cc9)
2024-04-21 09:26:50 +00:00
46e5cf2f22 developer: release: octopuce is not publicly visible
(cherry picked from commit 06233a63cd)
2024-04-21 07:07:25 +00:00
05c3a5d43d developer: infrastructure: v7.next.forgejo.org
(cherry picked from commit 51a1f2951e)
2024-04-21 07:07:05 +00:00
0ko
f37365b4bc developer: update localization admin guides
(cherry picked from commit 82ab0bb31b)
2024-04-21 06:54:27 +00:00
crystal
11048364ab fix 404
(cherry picked from commit d58d729c58)
2024-04-21 05:47:27 +00:00
crystal
6045d15696
Update version number in index 2024-04-20 03:17:05 -06:00
726f8cb2bc
the v7.0 branch is cut
(cherry picked from commit c11ee8a32d)
2024-04-20 11:08:16 +02:00
crystal
71ce2ff514 timetzdata is in the release build tags
(cherry picked from commit bd8e4e588a)
2024-04-20 08:52:23 +00:00
c874343142
admin: cli: mssql is deprecated only in v7.0+ 2024-04-20 10:44:26 +02:00
e9523e7732 docs: pick the Forgejo release from experimental (#542)
in the case of a release that is not yet published, it will exist as
release candidates in the experimental organization. Every release go
through there and it is a reliable source.

Reviewed-on: https://codeberg.org/forgejo/docs/pulls/542
Reviewed-by: crystal <crystal@noreply.codeberg.org>
Co-authored-by: Earl Warren <contact@earl-warren.org>
Co-committed-by: Earl Warren <contact@earl-warren.org>
(cherry picked from commit 4ce64e2840)
2024-04-20 08:39:21 +00:00
23 changed files with 266 additions and 601 deletions

View file

@ -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

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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

View file

@ -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`)
```

View file

@ -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/)

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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
```

View file

@ -1,5 +1,5 @@
---
title: 'Forgejo prerelease documentation'
title: 'Forgejo v7.0 documentation'
---
- [What is Forgejo?](/)

View file

@ -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

View file

@ -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:

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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.

View file

@ -30,7 +30,7 @@ Forgejo token scopes are as follows:
| &nbsp;&nbsp;&nbsp; **read:notification** | Grants read access to user notifications, such as which notifications users are subscribed to and read new notifications. |
| &nbsp;&nbsp;&nbsp; **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. |
| &nbsp;&nbsp;&nbsp; **read:organization** | Grants read access to org and team status, such as listing all organizations a user has visibility to, teams, and team members. |
| &nbsp;&nbsp;&nbsp; **read:organization** | Grants read access to org and team status, such as listing all orgs a user has visibility to, teams, and team members. |
| &nbsp;&nbsp;&nbsp; **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 |
| &nbsp;&nbsp;&nbsp; **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:
| &nbsp;&nbsp;&nbsp; **read:repository** | Grants read access to repository operations, such as getting repository files, releases, collaborators. |
| &nbsp;&nbsp;&nbsp; **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. |
| &nbsp;&nbsp;&nbsp; **read:user** | Grants read access to user operations, such as getting user repository subscriptions and user settings. |
| &nbsp;&nbsp;&nbsp; **write:user** | Grants read/write/delete access to user operations, such as updating user repository subscriptions, followed users, and user settings. |
| &nbsp;&nbsp;&nbsp; **read:user** | Grants read access to user operations, such as getting user repo subscriptions and user settings. |
| &nbsp;&nbsp;&nbsp; **write:user** | Grants read/write/delete access to user operations, such as updating user repo subscriptions, followed users, and user settings. |

View file

@ -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

View file

@ -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"