Compare commits
85
Commits
sutty
..
produccion
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
91c1f571ce
|
||
|
|
92cd920c08 | ||
|
|
9497e42181 | ||
|
|
f6f204c974 | ||
|
|
a74d85f4b1 | ||
|
|
2283a6046b | ||
|
|
41f5172a42 | ||
|
|
d6e6a8d404 | ||
|
|
3761b0ab5c | ||
|
|
12d374997c
|
||
|
|
f3fa092011 | ||
|
|
fe308a35bb | ||
|
|
1b16538e65 | ||
|
|
e49e3034f1 | ||
|
|
826b116c4b
|
||
|
|
690538efc8 | ||
|
|
472f53006c
|
||
|
|
505e6ab30a | ||
|
|
b9f6a463ee | ||
|
|
e047ec2bc3 | ||
|
|
18f6d14c3d
|
||
|
|
9ac1a5fcd9
|
||
|
|
6a10d71402
|
||
|
|
7cfea87d99
|
||
|
|
d39848fcd8
|
||
|
|
3577535b62
|
||
|
|
a0eeb57427
|
||
|
|
c884826b0a
|
||
|
|
11fc77d930
|
||
|
|
8cec92c042
|
||
|
|
108c3cb1aa
|
||
|
|
7f44cab6c9
|
||
|
|
461784c151
|
||
|
|
37a0fd3608
|
||
|
|
c216bba0ab
|
||
|
|
5e17977c4c
|
||
|
|
dbae7db490 | ||
|
|
44c276220d
|
||
|
|
66ebc75a59
|
||
|
|
a46b4c3fdb | ||
|
|
f1237cbed8
|
||
|
|
96b82f2cb1 | ||
|
|
f9c47541ce
|
||
|
|
850a08f42f | ||
|
|
73dc9c6fa0 | ||
|
|
c734a15897
|
||
|
|
aa0de92e5b
|
||
|
|
c8b1ccf5ba
|
||
|
|
65e8718063
|
||
|
|
9a741faa0c
|
||
|
|
bd330ed0b5
|
||
|
|
000de73bb3
|
||
|
|
de61429a3d
|
||
|
|
852903c166
|
||
|
|
5337637cb2
|
||
|
|
b734c56e24
|
||
|
|
b0f52307a5
|
||
|
|
de6d1a57ac | ||
|
|
40dc068a23
|
||
|
|
95d8277ab0
|
||
|
|
b92d0480e2 | ||
|
|
1a0a5705e5 | ||
|
|
f4b2ed1cd9 | ||
|
|
6cbbb8bc94 | ||
|
|
cbc43eddbc
|
||
|
|
b926ad8111
|
||
|
|
d5a826c87d
|
||
|
|
80a43c2a00
|
||
|
|
9daa7de95a
|
||
|
|
cda9018607
|
||
|
|
cd6b9a3ca8
|
||
|
|
6d62a06408
|
||
|
|
761e7cafde
|
||
|
|
68542fd9d0
|
||
|
|
996cdcd812
|
||
|
|
bcc1b43c42 | ||
|
|
0d7d090dbc | ||
|
|
c48aca9e0a
|
||
|
|
05dcbeed88 | ||
|
|
9bd561123c
|
||
|
|
fd9abbc314 | ||
|
|
1891af606c | ||
|
|
967dfde393 | ||
|
|
ae0c540f44 | ||
|
|
a28e4812f8 |
+32
-2
@@ -38,6 +38,10 @@ GITEA_ENABLE_PUSH_CREATE_USER=false
|
||||
GITEA_ENABLE_PUSH_CREATE_ORG=false
|
||||
GITEA_LFS_START_SERVER=false
|
||||
GITEA_MAX_CREATION_LIMIT=-1
|
||||
GITEA_SESSION_PROVIDER=db
|
||||
GITEA_CACHE_ADAPTER=memory
|
||||
GITEA_CACHE_HOST=
|
||||
GITEA_CACHE_ITEM_TTL=16h
|
||||
|
||||
GITEA_REPO_UPLOAD_ENABLED=true
|
||||
GITEA_REPO_UPLOAD_ALLOWED_TYPES=*/*
|
||||
@@ -47,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
|
||||
@@ -56,6 +60,25 @@ SECRET_DB_ROOT_PASSWORD_VERSION=v1
|
||||
SECRET_JWT_SECRET_VERSION=v1 # length=43
|
||||
SECRET_SECRET_KEY_VERSION=v1 # length=64
|
||||
|
||||
# Change to "minio" an configure to enable S3 storage
|
||||
# https://forgejo.org/docs/latest/admin/setup/storage/
|
||||
GITEA_STORAGE_TYPE=local
|
||||
# MINIO_ENDPOINT=
|
||||
# MINIO_ACCESS_KEY_ID=
|
||||
# SECRET_MINIO_SECRET_ACCESS_KEY_VERSION=v1
|
||||
# MINIO_BUCKET=
|
||||
# MINIO_BUCKET_LOOKUP=auto
|
||||
# MINIO_LOCATION=garage
|
||||
# MINIO_CHECKSUM_ALGORITHM=default
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.s3.yml"
|
||||
|
||||
# Instance Commit Signing
|
||||
# https://forgejo.org/docs/latest/admin/advanced/signing/
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.signing.yml"
|
||||
# GITEA_SIGNING_ENABLED=1
|
||||
# SECRET_SIGNING_PUBLIC_KEY_VERSION=v1
|
||||
# SECRET_SIGNING_PRIVATE_KEY_VERSION=v1
|
||||
|
||||
# SMTP Mailer
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.smtp.yml"
|
||||
# GITEA_SMTP_MAILER_ENABLED=1
|
||||
@@ -81,3 +104,10 @@ SECRET_SECRET_KEY_VERSION=v1 # length=64
|
||||
# GITEA_REPO_INDEXER_ENABLED=false
|
||||
# GITEA_ISSUE_INDEXER_TYPE=db
|
||||
# GITEA_STARTUP_TIMEOUT=-1
|
||||
|
||||
# Prometheus metrics
|
||||
# FORGEJO_METRICS_ENABLED=false
|
||||
# FORGEJO_METRICS_ENABLED_ISSUE_BY_LABEL=false
|
||||
# FORGEJO_METRICS_ENABLED_ISSUE_BY_REPOSITORY=false
|
||||
# SECRET_FORGEJO_METRICS_TOKEN_VERSION=v1
|
||||
# COMPOSE_FILE="$COMPOSE_FILE:compose.metrics.yml"
|
||||
|
||||
@@ -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
|
||||
@@ -52,17 +52,28 @@ 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
|
||||
app. Don't forget to actually [enable Anubis on the Traefik app
|
||||
too](https://recipes.coopcloud.tech/traefik)!
|
||||
|
||||
## [Instance Commit Signing](https://forgejo.org/docs/latest/admin/advanced/signing/)
|
||||
|
||||
To allow Forgejo to sign commits, uncomment the corresponding
|
||||
configuration block, and then generate and insert the SSH keys:
|
||||
|
||||
```sh
|
||||
abra app config git.example.coop
|
||||
ssh-keygen -t ed25519
|
||||
app app secret insert git.example.coop signing_public_key v1 -f ~/.ssh/id_ed25519.pub
|
||||
app app secret insert git.example.coop signing_private_key v1 -f ~/.ssh/id_ed25519
|
||||
app app deploy git.example.coop
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export APP_INI_VERSION=v25
|
||||
export DOCKER_SETUP_SH_VERSION=v1
|
||||
export APP_INI_VERSION=v30
|
||||
export DOCKER_SETUP_SH_VERSION=v2
|
||||
export PG_BACKUP_VERSION=v1
|
||||
|
||||
abra_backup_app() {
|
||||
|
||||
+47
-3
@@ -16,6 +16,21 @@ PATH = {{ env "GITEA_PATH" }}
|
||||
DISABLE_GRAVATAR = {{ env "GITEA_DISABLE_GRAVATAR" }}
|
||||
ENABLE_FEDERATED_AVATAR = {{ env "GITEA_ENABLE_FEDERATED_AVATAR" }}
|
||||
|
||||
[storage]
|
||||
STORAGE_TYPE = {{ env "GITEA_STORAGE_TYPE" }}
|
||||
{{ if eq (env "GITEA_STORAGE_TYPE") "minio" }}
|
||||
SERVE_DIRECT = false
|
||||
MINIO_ENDPOINT = {{ env "MINIO_ENDPOINT" }}
|
||||
MINIO_ACCESS_KEY_ID = {{ env "MINIO_ACCESS_KEY_ID" }}
|
||||
MINIO_SECRET_ACCESS_KEY = {{ secret "minio_secret_access_key" }}
|
||||
MINIO_BUCKET = {{ env "MINIO_BUCKET" }}
|
||||
MINIO_BUCKET_LOOKUP = {{ env "MINIO_BUCKET_LOOKUP" }}
|
||||
MINIO_LOCATION = {{ env "MINIO_LOCATION" }}
|
||||
MINIO_USE_SSL = true
|
||||
MINIO_INSECURE_SKIP_VERIFY = false
|
||||
MINIO_CHECKSUM_ALGORITHM = {{ env "MINIO_CHECKSUM_ALGORITHM" }}
|
||||
{{ end }}
|
||||
|
||||
[service]
|
||||
ALLOW_ONLY_EXTERNAL_REGISTRATION = {{ env "GITEA_ALLOW_ONLY_EXTERNAL_REGISTRATION" }}
|
||||
ALLOW_ONLY_INTERNAL_REGISTRATION = {{ env "GITEA_ALLOW_ONLY_INTERNAL_REGISTRATION" }}
|
||||
@@ -47,6 +62,18 @@ ALLOWED_TYPES = {{ env "GITEA_REPO_UPLOAD_ALLOWED_TYPES" }}
|
||||
FILE_MAX_SIZE = {{ env "GITEA_REPO_UPLOAD_MAX_SIZE" }}
|
||||
MAX_FILES = {{ env "GITEA_REPO_UPLOAD_MAX_FILES" }}
|
||||
|
||||
{{ if eq (env "GITEA_SIGNING_ENABLED") "1" }}
|
||||
[repository.signing]
|
||||
FORMAT = ssh
|
||||
SIGNING_KEY = /var/lib/gitea/signing_key.pub
|
||||
SIGNING_NAME = {{ env "GITEA_APP_NAME" }}
|
||||
SIGNING_EMAIL = {{ env "GITEA_MAILER_FROM" }}
|
||||
INITIAL_COMMIT = always
|
||||
WIKI = always
|
||||
CRUD_ACTIONS = always
|
||||
MERGES = always
|
||||
{{ end }}
|
||||
|
||||
[ui]
|
||||
SHOW_USER_EMAIL = {{ env "GITEA_SHOW_USER_EMAIL" }}
|
||||
|
||||
@@ -60,9 +87,10 @@ 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" }}
|
||||
|
||||
@@ -111,3 +139,19 @@ MODE=console
|
||||
LEVEL=WARN
|
||||
STACKTRACE_LEVEL=None
|
||||
ENABLE_XORM_LOG=false
|
||||
|
||||
[session]
|
||||
PROVIDER = {{ env "GITEA_SESSION_PROVIDER" }}
|
||||
|
||||
[cache]
|
||||
ADAPTER = {{ env "GITEA_CACHE_ADAPTER" }}
|
||||
HOST = {{ env "GITEA_CACHE_HOST" }}
|
||||
ITEM_TTL = {{ env "GITEA_CACHE_ITEM_TTL" }}
|
||||
|
||||
{{ if eq (env "FORGEJO_METRICS_ENABLED") "true" }}
|
||||
[metrics]
|
||||
ENABLED = {{ env "FORGEJO_METRICS_ENABLED" }}
|
||||
ENABLED_ISSUE_BY_LABEL = {{ env "FORGEJO_METRICS_ENABLED_ISSUE_BY_LABEL" }}
|
||||
ENABLED_ISSUE_BY_REPOSITORY = {{ env "FORGEJO_METRICS_ENABLED_ISSUE_BY_REPOSITORY" }}
|
||||
TOKEN = {{ secret "metrics_token" }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
secrets:
|
||||
- metrics_token
|
||||
deploy:
|
||||
labels:
|
||||
- "prometheus.io/scrape=true"
|
||||
- "prometheus.io/port=3000"
|
||||
- "prometheus.io/path=/metrics"
|
||||
- "prometheus.io/auth=bearer"
|
||||
secrets:
|
||||
metrics_token:
|
||||
name: ${STACK_NAME}_metrics_token_${SECRET_FORGEJO_METRICS_TOKEN_VERSION}
|
||||
external: true
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
version: "3.8"
|
||||
services:
|
||||
app:
|
||||
secrets:
|
||||
- minio_secret_access_key
|
||||
secrets:
|
||||
minio_secret_access_key:
|
||||
name: ${STACK_NAME}_minio_secret_access_key_${SECRET_MINIO_SECRET_ACCESS_KEY_VERSION}
|
||||
external: true
|
||||
@@ -0,0 +1,14 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
app:
|
||||
secrets:
|
||||
- signing_public_key
|
||||
- signing_private_key
|
||||
secrets:
|
||||
signing_public_key:
|
||||
name: ${STACK_NAME}_signing_public_key_${SECRET_SIGNING_PUBLIC_KEY_VERSION}
|
||||
external: true
|
||||
signing_private_key:
|
||||
name: ${STACK_NAME}_signing_private_key_${SECRET_SIGNING_PRIVATE_KEY_VERSION}
|
||||
external: true
|
||||
@@ -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}"
|
||||
+6
-11
@@ -3,10 +3,10 @@ version: "3.8"
|
||||
|
||||
services:
|
||||
app:
|
||||
image: codeberg.org/forgejo/forgejo:14.0.1-rootless
|
||||
image: codeberg.org/forgejo/forgejo:15.0.8-rootless
|
||||
configs:
|
||||
- source: app_ini
|
||||
target: /etc/gitea/app.ini
|
||||
target: /var/lib/gitea/custom/conf/app.ini
|
||||
- source: docker_setup_sh
|
||||
target: /usr/local/bin/docker-setup.sh
|
||||
mode: 0555
|
||||
@@ -26,7 +26,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
|
||||
@@ -59,14 +59,13 @@ services:
|
||||
- GITEA_MAX_CREATION_LIMIT=${GITEA_MAX_CREATION_LIMIT:--1}
|
||||
volumes:
|
||||
- data:/var/lib/gitea
|
||||
- config:/etc/gitea
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
networks:
|
||||
- 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
|
||||
@@ -74,7 +73,7 @@ services:
|
||||
deploy:
|
||||
update_config:
|
||||
failure_action: rollback
|
||||
order: start-first
|
||||
order: stop-first
|
||||
labels:
|
||||
- "backupbot.backup=${ENABLE_BACKUPS:-true}"
|
||||
- "traefik.enable=true"
|
||||
@@ -82,16 +81,13 @@ 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.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.0.3+13.0.4-rootless
|
||||
- coop-cloud.${STACK_NAME}.version=5.6.2+15.0.8-rootless
|
||||
|
||||
|
||||
networks:
|
||||
@@ -125,4 +121,3 @@ secrets:
|
||||
|
||||
volumes:
|
||||
data:
|
||||
config:
|
||||
|
||||
@@ -6,10 +6,18 @@
|
||||
# Prepare git folder
|
||||
mkdir -p ${HOME} && chmod 0700 ${HOME}
|
||||
if [ ! -w ${HOME} ]; then echo "${HOME} is not writable"; exit 1; fi
|
||||
|
||||
# Prepare custom folder
|
||||
mkdir -p ${GITEA_CUSTOM} && chmod 0500 ${GITEA_CUSTOM}
|
||||
|
||||
# Prepare temp folder
|
||||
mkdir -p ${GITEA_TEMP} && chmod 0700 ${GITEA_TEMP}
|
||||
if [ ! -w ${GITEA_TEMP} ]; then echo "${GITEA_TEMP} is not writable"; exit 1; fi
|
||||
|
||||
if [ -e /run/secrets/signing_public_key ] ; then
|
||||
if [ ! -e /var/lib/gitea/signing_key.pub ]; then
|
||||
ln -s /run/secrets/signing_public_key /var/lib/gitea/signing_key.pub
|
||||
ln -s /run/secrets/signing_private_key /var/lib/gitea/signing_key
|
||||
fi
|
||||
|
||||
chmod 600 /var/lib/gitea/signing_key*
|
||||
fi
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/14.0.0.md https://codeberg.org/forgejo/forgejo/src/branch/forgejo/release-notes-published/14.0.1.md
|
||||
@@ -0,0 +1 @@
|
||||
New enviromental variables have been added! Please update your .env before deploying.
|
||||
+2
-1
@@ -4,6 +4,7 @@
|
||||
"config:recommended"
|
||||
],
|
||||
"reviewers": [
|
||||
"team:forgejo-maintainers"
|
||||
"fauno",
|
||||
"p4u1"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user