Compare commits
75
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2c192e9f13
|
||
|
|
09001abacd | ||
|
|
bb47746e47
|
||
|
|
9b3afbecf4
|
||
|
|
3129e59d06 | ||
|
|
1b7fda4d49 | ||
|
|
a6d7f630f9 | ||
|
|
6f82caf9e2
|
||
|
|
d20178aa74 | ||
|
|
4f54fb3763 | ||
|
|
6381c9b624
|
||
|
|
784987a7d3
|
||
|
|
bd6a4bc726 | ||
|
|
9619316b4b | ||
|
|
ecdd4be100 | ||
|
|
d0e67186e7 | ||
|
|
4aef489937 | ||
|
|
2af87760f0
|
||
|
|
a6e333dc07
|
||
|
|
724fb33097
|
||
|
|
3e1d5885ae | ||
|
|
b699281073 | ||
|
|
728a9f6abd | ||
|
|
5a0f726bad
|
||
|
|
dc61fe5fa0 | ||
|
|
7a08e33adb
|
||
|
|
84702e4819
|
||
|
|
c6d152bff7 | ||
|
|
f5b581a487 | ||
|
|
010c852dc2 | ||
|
|
91c1f571ce
|
||
|
|
92cd920c08 | ||
|
|
9497e42181 | ||
|
|
f6f204c974 | ||
|
|
a74d85f4b1 | ||
|
|
2283a6046b | ||
|
|
0be6864e52 | ||
|
|
41f5172a42 | ||
|
|
d6e6a8d404 | ||
|
|
3761b0ab5c | ||
|
|
811555fee9 | ||
|
|
12d374997c
|
||
|
|
f3fa092011 | ||
|
|
fe308a35bb | ||
|
|
1b16538e65 | ||
|
|
e49e3034f1 | ||
|
|
826b116c4b
|
||
|
|
690538efc8 | ||
|
|
18f6d14c3d
|
||
|
|
9ac1a5fcd9
|
||
|
|
6a10d71402
|
||
|
|
7cfea87d99
|
||
|
|
d39848fcd8
|
||
|
|
3577535b62
|
||
|
|
a0eeb57427
|
||
|
|
c884826b0a
|
||
|
|
8cec92c042
|
||
|
|
7f44cab6c9
|
||
|
|
461784c151
|
||
|
|
c216bba0ab
|
||
|
|
dbae7db490 | ||
|
|
66ebc75a59
|
||
|
|
c734a15897
|
||
|
|
c8b1ccf5ba
|
||
|
|
9a741faa0c
|
||
|
|
bd330ed0b5
|
||
|
|
de61429a3d
|
||
|
|
5337637cb2
|
||
|
|
40dc068a23
|
||
|
|
cbc43eddbc
|
||
|
|
b926ad8111
|
||
|
|
d5a826c87d
|
||
|
|
9daa7de95a
|
||
|
|
cd6b9a3ca8
|
||
|
|
6d62a06408
|
+6
-3
@@ -51,8 +51,8 @@ GITEA_REPO_UPLOAD_MAX_FILES=5
|
||||
GITEA_MAILER_FROM=noreply@example.com
|
||||
GITEA_MAILER_USER=noreply@example.com
|
||||
|
||||
GITEA_SSH_PORT=2222
|
||||
GITEA_SSH_ENABLED=1
|
||||
# SSH Support
|
||||
COMPOSE_FILE="$COMPOSE_FILE:compose.ssh.yml"
|
||||
|
||||
SECRET_INTERNAL_TOKEN_VERSION=v1 # length=105
|
||||
SECRET_DB_PASSWORD_VERSION=v1
|
||||
@@ -103,7 +103,7 @@ GITEA_STORAGE_TYPE=local
|
||||
# Indexer (for issue search)
|
||||
# GITEA_REPO_INDEXER_ENABLED=false
|
||||
# GITEA_ISSUE_INDEXER_TYPE=db
|
||||
# GITEA_STARTUP_TIMEOUT=-1
|
||||
# GITEA_STARTUP_TIMEOUT=0s
|
||||
|
||||
# Prometheus metrics
|
||||
# FORGEJO_METRICS_ENABLED=false
|
||||
@@ -111,3 +111,6 @@ GITEA_STORAGE_TYPE=local
|
||||
# FORGEJO_METRICS_ENABLED_ISSUE_BY_REPOSITORY=false
|
||||
# SECRET_FORGEJO_METRICS_TOKEN_VERSION=v1
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"
|
||||
|
||||
# Enable access logs. See Access logs on Traefik.
|
||||
#ACCESS_LOGS=true
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[](https://build.coopcloud.tech/coop-cloud/forgejo)
|
||||
|
||||
<!-- metadata -->
|
||||
* **Maintainer**: [@p4u1](https://git.coopcloud.tech/p4u1), [@fauno](https://git.coopcloud.tech/fauno)
|
||||
* **Maintainer**: [@fauno](https://git.coopcloud.tech/fauno)
|
||||
* **Category**: Development
|
||||
* **Status**: 5
|
||||
* **Image**: [`forgejo/forgejo`](https://codeberg.org/forgejo/-/packages/container/forgejo/13-rootless), 4, upstream
|
||||
@@ -29,7 +29,7 @@
|
||||
Run
|
||||
|
||||
```bash
|
||||
abra app run YOURAPPNAME app forgejo -c /etc/gitea/app.ini admin user create --username USERNAME --admin --random-password --email EMAIL
|
||||
abra app run YOURAPPNAME app -- forgejo --config /var/lib/gitea/custom/conf/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`.
|
||||
@@ -52,15 +52,13 @@ abra app deploy YOURTRAEFIKAPP
|
||||
```
|
||||
You might need to wait a bit. To check if it worked, you can run
|
||||
```
|
||||
telnet my.gitea.example.com 2222
|
||||
telnet my.forgejo.example.com 2222
|
||||
```
|
||||
Once you have added a public SSH key, you can check that you can connect to your gitea server with
|
||||
Once you have added a public SSH key, you can check that you can connect to your Forgejo server with
|
||||
```
|
||||
ssh -T -p 2222 git@my.gitea.example.com
|
||||
ssh -T -p 2222 git@my.forgejo.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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export APP_INI_VERSION=v27
|
||||
export DOCKER_SETUP_SH_VERSION=v2
|
||||
export APP_INI_VERSION=v34
|
||||
export DOCKER_SETUP_SH_VERSION=v3
|
||||
export PG_BACKUP_VERSION=v1
|
||||
|
||||
abra_backup_app() {
|
||||
|
||||
+12
-5
@@ -80,16 +80,17 @@ SHOW_USER_EMAIL = {{ env "GITEA_SHOW_USER_EMAIL" }}
|
||||
[indexer]
|
||||
REPO_INDEXER_ENABLED = {{ or (env "GITEA_REPO_INDEXER_ENABLED") "false" }}
|
||||
ISSUE_INDEXER_TYPE= {{ or (env "GITEA_ISSUE_INDEXER_TYPE") "db" }}
|
||||
STARTUP_TIMEOUT = {{ or (env "GITEA_STARTUP_TIMEOUT") "-1" }}
|
||||
STARTUP_TIMEOUT = {{ or (env "GITEA_STARTUP_TIMEOUT") "0s" }}
|
||||
|
||||
[server]
|
||||
DOMAIN = {{ env "GITEA_DOMAIN" }}
|
||||
LANDING_PAGE = {{ env "GITEA_LANDING_PAGE" }}
|
||||
ROOT_URL = https://%(DOMAIN)s/
|
||||
SSH_DOMAIN = {{ env "GITEA_DOMAIN" }}
|
||||
SSH_LISTEN_PORT = {{ env "GITEA_SSH_PORT" }}
|
||||
SSH_PORT = {{ env "GITEA_SSH_PORT" }}
|
||||
START_SSH_SERVER = true
|
||||
SSH_LISTEN_PORT = 2222
|
||||
SSH_PORT = 2222
|
||||
START_SSH_SERVER = {{ env "GITEA_SSH_ENABLED" }}
|
||||
DISABLE_SSH = {{ if eq (env "GITEA_SSH_ENABLED") "true" }}false{{ else }}true{{ end }}
|
||||
LFS_START_SERVER = {{ env "GITEA_LFS_START_SERVER" }}
|
||||
LFS_JWT_SECRET = {{ secret "lfs_jwt_secret" }}
|
||||
|
||||
@@ -135,9 +136,15 @@ IS_INPUT_FILE = false
|
||||
|
||||
[log]
|
||||
MODE=console
|
||||
LEVEL=WARN
|
||||
LEVEL=DEBUG
|
||||
STACKTRACE_LEVEL=None
|
||||
ENABLE_XORM_LOG=false
|
||||
LOGGER_ACCESS_MODE = access-file
|
||||
|
||||
[log.access-file]
|
||||
MODE=file
|
||||
LEVEL=Debug
|
||||
FILE_NAME=access.log
|
||||
|
||||
[session]
|
||||
PROVIDER = {{ env "GITEA_SESSION_PROVIDER" }}
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ services:
|
||||
secrets:
|
||||
- db_password
|
||||
db:
|
||||
image: "mariadb:10.11.2"
|
||||
image: "mariadb:10.11.19"
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup.pre-hook: 'mysqldump --single-transaction -u root -p"$$(cat /run/secrets/db_root_password)" gitea > /var/lib/mysql/backup.sql'
|
||||
|
||||
@@ -10,7 +10,7 @@ services:
|
||||
secrets:
|
||||
- db_password
|
||||
db:
|
||||
image: postgres:15.13
|
||||
image: postgres:15.19
|
||||
deploy:
|
||||
labels:
|
||||
backupbot.backup.pre-hook: "/pg_backup.sh backup"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
environment:
|
||||
- GITEA_SSH_ENABLED=true
|
||||
deploy:
|
||||
labels:
|
||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
|
||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
|
||||
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
|
||||
+8
-7
@@ -3,7 +3,8 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: codeberg.org/forgejo/forgejo:15.0.5-rootless
|
||||
#image: git.sutty.abyaya.la/containers/forgejo:15.0.8-rootless
|
||||
image: codeberg.org/forgejo/forgejo:17.0.2-rootless
|
||||
configs:
|
||||
- source: app_ini
|
||||
target: /var/lib/gitea/custom/conf/app.ini
|
||||
@@ -15,6 +16,7 @@ services:
|
||||
- jwt_secret
|
||||
- secret_key
|
||||
- lfs_jwt_secret
|
||||
entrypoint: "/usr/bin/dumb-init -- /usr/local/bin/docker-entrypoint.sh"
|
||||
environment:
|
||||
- GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION
|
||||
- GITEA_ALLOW_ONLY_INTERNAL_REGISTRATION
|
||||
@@ -26,7 +28,7 @@ services:
|
||||
- GITEA_ENABLE_OPENID_SIGNIN
|
||||
- GITEA_ENABLE_OPENID_SIGNUP
|
||||
- GITEA_SMTP_MAILER_ENABLED
|
||||
- GITEA_SSH_PORT
|
||||
- GITEA_SSH_ENABLED=false
|
||||
- GITEA_DISABLE_GRAVATAR
|
||||
- GITEA_ENABLE_FEDERATED_AVATAR
|
||||
- GITEA_REGISTER_EMAIL_CONFIRM
|
||||
@@ -65,7 +67,7 @@ services:
|
||||
- proxy
|
||||
- internal
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"]
|
||||
test: ["CMD", "curl", "--user-agent=healthcheck", "-f", "http://localhost:3000/api/healthz"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 10
|
||||
@@ -81,16 +83,15 @@ services:
|
||||
- "traefik.http.routers.${STACK_NAME}.entrypoints=web-secure"
|
||||
- "traefik.http.services.${STACK_NAME}.loadbalancer.server.port=3000"
|
||||
- "traefik.http.routers.${STACK_NAME}.tls.certresolver=${LETS_ENCRYPT_ENV}"
|
||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.rule=HostSNI(`*`)"
|
||||
- "traefik.tcp.routers.${STACK_NAME}-ssh.entrypoints=gitea-ssh"
|
||||
- "traefik.tcp.services.${STACK_NAME}-ssh.loadbalancer.server.port=${GITEA_SSH_PORT}"
|
||||
- "traefik.http.routers.${STACK_NAME}.middlewares=${STACK_NAME}_cors"
|
||||
- "traefik.http.routers.${STACK_NAME}.observability.accesslogs=${ACCESS_LOGS:-false}"
|
||||
- "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=5.4.0+15.0.2-rootless
|
||||
- "traefik.http.middlewares.${STACK_NAME}-buffering.buffering.maxRequestBodyBytes=0"
|
||||
- coop-cloud.${STACK_NAME}.version=6.0.2+17.0.1-rootless
|
||||
|
||||
|
||||
networks:
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Since PR 10273 was merged, durations need a unit, otherwise Forgejo
|
||||
would refuse to start. Check your GITEA_STARTUP_TIMEOUT value and make
|
||||
sure it ends with s for seconds.
|
||||
|
||||
https://codeberg.org/forgejo/forgejo/pulls/10273
|
||||
Reference in New Issue
Block a user