Compare commits
30 Commits
3.4.0+1.24
...
maintainer
| Author | SHA1 | Date | |
|---|---|---|---|
| 5d8e984ec9 | |||
| 675d6b9347 | |||
| 9696bef17a | |||
| 670c6d070e | |||
| 51f9ec7564 | |||
| 5a63921823 | |||
| 618dc563b2 | |||
| 865f228137 | |||
| 8d3a8942d6 | |||
| 08551b2972 | |||
| 29f71e90c5 | |||
| 64289a49ea | |||
| 072e0a9bcd | |||
| 7baf5edeee | |||
| 43c493dd70 | |||
| 3adf9d3915 | |||
| c0afa0fa48 | |||
| 19cf5e34ee | |||
| dbf2be1463 | |||
| 288f1df668 | |||
| 32b1979f48 | |||
| cde0087d69 | |||
| ef74971b0e | |||
| d86d742ed1 | |||
| 989294173e | |||
| 4e789bf977 | |||
| 485fa32512 | |||
| 54fd30f38a | |||
| 6d586f6ad3 | |||
| 8c9793ace9 |
13
.env.sample
13
.env.sample
@ -1,6 +1,6 @@
|
||||
TYPE=gitea
|
||||
TYPE=forgejo
|
||||
|
||||
DOMAIN=gitea.example.com
|
||||
DOMAIN=forgejo.example.com
|
||||
LETS_ENCRYPT_ENV=production
|
||||
COMPOSE_FILE="compose.yml"
|
||||
ENABLE_BACKUPS=true
|
||||
@ -8,11 +8,12 @@ COMPOSE_FILE="$COMPOSE_FILE:compose.mariadb.yml"
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.sqlite3.yml"
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.postgres.yml"
|
||||
|
||||
# Enable to use forgejo instead of gitea
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml"
|
||||
# SECRET_LFS_JWT_SECRET_VERSION=v1 # length=43
|
||||
SECRET_LFS_JWT_SECRET_VERSION=v1 # length=43
|
||||
|
||||
GITEA_DOMAIN=git.example.com
|
||||
# Anubis
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.anubis.yml"
|
||||
|
||||
GITEA_DOMAIN="${DOMAIN}"
|
||||
GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION=true
|
||||
GITEA_APP_NAME="Git with solidaritea"
|
||||
GITEA_AUTO_WATCH_NEW_REPOS=false
|
||||
|
||||
32
MAINTENANCE.md
Normal file
32
MAINTENANCE.md
Normal file
@ -0,0 +1,32 @@
|
||||
# Forgejo Recipe Maintenance
|
||||
|
||||
All contributions should be made via a pull request. This is to ensure a
|
||||
certain quality and consistency, that others can rely on.
|
||||
|
||||
## Maintainer Responsibilities
|
||||
|
||||
A recipe maintainer has the following responsibilities:
|
||||
|
||||
- Respond to pull requests / issues within a week
|
||||
- Make image security updates within a day
|
||||
- Make image patch / minor updates within a week
|
||||
- Make image major updates within a month
|
||||
|
||||
In order to fullfill these responsibilities a recipe maintainer:
|
||||
|
||||
- Has to watch the repository (to get notifications)
|
||||
- Needs to make sure renovate is configured properly
|
||||
|
||||
## Pull Requests
|
||||
|
||||
A pull request can be merged if it is approved by at least one maintainer. For
|
||||
pull requests opened by a maintainer they need to be approved by another
|
||||
maintainer. Even though it is okay to merge a pull request with one approval, it
|
||||
is always better if all maintainers looked at the pull request and approved it.
|
||||
|
||||
## Become a maintainer
|
||||
|
||||
Everyone can apply to be a recipe maintainer:
|
||||
1. Watch the repository to always get updates
|
||||
2. Simply add your self to the list in the [README.md](./README.md) and open a new pull request with the change.
|
||||
3. Once the pull request gets merged you will be added to the [forgejo maintainers team](https://git.coopcloud.tech/org/coop-cloud/teams/forgejo-maintainers).
|
||||
17
README.md
17
README.md
@ -1,11 +1,12 @@
|
||||
# Gitea
|
||||
# Forgejo
|
||||
|
||||
[](https://build.coopcloud.tech/coop-cloud/gitea)
|
||||
[](https://build.coopcloud.tech/coop-cloud/forgejo)
|
||||
|
||||
<!-- metadata -->
|
||||
* **Maintainer**: [@p4u1](https://git.coopcloud.tech/p4u1), [@fauno](https://git.coopcloud.tech/fauno)
|
||||
* **Category**: Development
|
||||
* **Status**: 5
|
||||
* **Image**: [`gitea/gitea`](https://hub.docker.com/gitea/gitea), 4, upstream
|
||||
* **Image**: [`forgejo/forgejo`](https://codeberg.org/forgejo/-/packages/container/forgejo/13-rootless), 4, upstream
|
||||
* **Healthcheck**: Yes
|
||||
* **Backups**: Yes
|
||||
* **Email**: Yes
|
||||
@ -17,7 +18,7 @@
|
||||
|
||||
1. Set up Docker Swarm and [`abra`][abra]
|
||||
2. Deploy [`coop-cloud/traefik`][cc-traefik]
|
||||
3. `abra app new gitea --secrets` (optionally with `--pass` if you'd like
|
||||
3. `abra app new forgejo --secrets` (optionally with `--pass` if you'd like
|
||||
to save secrets in `pass`)
|
||||
4. `abra app config YOURAPPDOMAIN` - be sure to change `$DOMAIN` to something that resolves to
|
||||
your Docker swarm box
|
||||
@ -28,7 +29,7 @@
|
||||
Run
|
||||
|
||||
```bash
|
||||
abra app run YOURAPPNAME app gitea -c /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL
|
||||
abra app run YOURAPPNAME app forgejo -c /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL
|
||||
```
|
||||
|
||||
See the [Gitea command-line documentation](https://docs.gitea.io/en-us/command-line/) for more options. Make sure not to forget the `-c /etc/gitea/app.ini`.
|
||||
@ -59,3 +60,9 @@ ssh -T -p 2222 git@my.gitea.example.com
|
||||
```
|
||||
|
||||
Note that gitea should be configured to listen to port 2222, i.e. `GITEA_SSH_PORT=2222` in the gitea config.
|
||||
|
||||
## Protect Forgejo from scrapers with Anubis
|
||||
|
||||
Uncomment the Anubis compose file from the `.env` file and re-deploy the
|
||||
app. Don't forget to actually [enable Anubis on the Traefik app
|
||||
too](https://recipes.coopcloud.tech/traefik)!
|
||||
|
||||
2
abra.sh
2
abra.sh
@ -1,4 +1,4 @@
|
||||
export APP_INI_VERSION=v21
|
||||
export APP_INI_VERSION=v23
|
||||
export DOCKER_SETUP_SH_VERSION=v1
|
||||
export PG_BACKUP_VERSION=v1
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ DEFAULT_USER_VISIBILITY = {{ env "GITEA_DEFAULT_USER_VISIBILITY" }}
|
||||
ALLOWED_USER_VISIBILITY_MODES = {{ env "GITEA_ALLOWED_USER_VISIBILITY_MODES" }}
|
||||
DEFAULT_ORG_VISIBILITY = {{ env "GITEA_DEFAULT_ORG_VISIBILITY" }}
|
||||
REQUIRE_SIGNIN_VIEW = {{ env "GITEA_REQUIRE_SIGNIN_VIEW" }}
|
||||
ENABLE_INTERNAL_SIGNIN = {{ env "GITEA_ENABLE_INTERNAL_SIGNIN" }}
|
||||
|
||||
[openid]
|
||||
ENABLE_OPENID_SIGNIN = {{ env "GITEA_ENABLE_OPENID_SIGNIN" }}
|
||||
@ -61,9 +62,7 @@ SSH_LISTEN_PORT = {{ env "GITEA_SSH_PORT" }}
|
||||
SSH_PORT = {{ env "GITEA_SSH_PORT" }}
|
||||
START_SSH_SERVER = true
|
||||
LFS_START_SERVER = {{ env "GITEA_LFS_START_SERVER" }}
|
||||
{{ if eq (env "FORGE") "forgejo" }}
|
||||
LFS_JWT_SECRET = {{ secret "lfs_jwt_secret" }}
|
||||
{{ end }}
|
||||
|
||||
[security]
|
||||
INSTALL_LOCK = true
|
||||
|
||||
7
compose.anubis.yml
Normal file
7
compose.anubis.yml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
deploy:
|
||||
labels:
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=anubis,${STACK_NAME}_cors"
|
||||
@ -1,13 +0,0 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: codeberg.org/forgejo/forgejo:11.0.2-rootless
|
||||
environment:
|
||||
- FORGE=forgejo
|
||||
secrets:
|
||||
- lfs_jwt_secret
|
||||
secrets:
|
||||
lfs_jwt_secret:
|
||||
name: ${STACK_NAME}_lfs_jwt_secret_${SECRET_LFS_JWT_SECRET_VERSION}
|
||||
external: true
|
||||
11
compose.yml
11
compose.yml
@ -3,7 +3,7 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: "gitea/gitea:1.24.2-rootless"
|
||||
image: codeberg.org/forgejo/forgejo:13.0.4-rootless
|
||||
configs:
|
||||
- source: app_ini
|
||||
target: /etc/gitea/app.ini
|
||||
@ -14,8 +14,8 @@ services:
|
||||
- internal_token
|
||||
- jwt_secret
|
||||
- secret_key
|
||||
- lfs_jwt_secret
|
||||
environment:
|
||||
- FORGE=gitea
|
||||
- GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION
|
||||
- GITEA_APP_NAME
|
||||
- GITEA_AUTO_WATCH_NEW_REPOS
|
||||
@ -54,6 +54,7 @@ services:
|
||||
- GITEA_REQUIRE_SIGNIN_VIEW
|
||||
- GITEA__oauth2__REFRESH_TOKEN_EXPIRATION_TIME
|
||||
- GITEA_LFS_START_SERVER=${GITEA_LFS_START_SERVER:-false}
|
||||
- GITEA_ENABLE_INTERNAL_SIGNIN
|
||||
volumes:
|
||||
- data:/var/lib/gitea
|
||||
- config:/etc/gitea
|
||||
@ -84,10 +85,11 @@ services:
|
||||
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}_cors"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowmethods=GET,OPTIONS,PUT"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolallowheaders=content-type,authorization"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolalloworiginlist=https://${GITEA_CORS_ALLOW_DOMAIN}"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.accesscontrolmaxage=100"
|
||||
- "traefik.http.middlewares.${STACK_NAME}_cors.headers.addvaryheader=true"
|
||||
- coop-cloud.${STACK_NAME}.version=3.4.0+1.24.2-rootless
|
||||
- coop-cloud.${STACK_NAME}.version=5.0.3+13.0.4-rootless
|
||||
|
||||
|
||||
networks:
|
||||
@ -115,6 +117,9 @@ secrets:
|
||||
secret_key:
|
||||
name: ${STACK_NAME}_secret_key_${SECRET_SECRET_KEY_VERSION}
|
||||
external: true
|
||||
lfs_jwt_secret:
|
||||
name: ${STACK_NAME}_lfs_jwt_secret_${SECRET_LFS_JWT_SECRET_VERSION}
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
data:
|
||||
|
||||
3
release/4.0.0+12.0.2-rootless
Normal file
3
release/4.0.0+12.0.2-rootless
Normal file
@ -0,0 +1,3 @@
|
||||
This recipe was forked from the gitea recipe and should be a drop in replacement.
|
||||
|
||||
You can remove this line from your app.env COMPOSE_FILE="$COMPOSE_FILE:compose.forgejo.yml"
|
||||
1
release/5.0.0+13.0.2-rootless
Normal file
1
release/5.0.0+13.0.2-rootless
Normal file
@ -0,0 +1 @@
|
||||
For breaking changes see: https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/13.0.0.md
|
||||
6
renovate.json
Normal file
6
renovate.json
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||
"extends": [
|
||||
"config:recommended"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user