Compare commits

..

19 Commits

Author SHA1 Message Date
f
c734a15897 Merge branch 'session' into produccion 2026-05-20 10:29:30 -03:00
f
aa0de92e5b fix: change default session provider to db
this should help with folks having to log in again after restarts
2026-05-20 10:16:33 -03:00
f
c8b1ccf5ba Merge branch 'shutdown' into produccion 2026-05-19 10:44:04 -03:00
f
65e8718063 fix: stop the running container first coop-cloud/gitea#53 2026-05-19 10:43:38 -03:00
f
9a741faa0c fix: prevent anubis from redirecting the health check 2026-05-18 10:03:19 -03:00
f
bd330ed0b5 Merge branch 'signing' into produccion 2026-05-16 20:11:06 -03:00
f
000de73bb3 fix: allow key rotation 2026-05-16 13:10:16 -03:00
f
de61429a3d Merge branch 'caching' into produccion 2026-05-15 17:01:10 -03:00
f
852903c166 feat: caching settings 2026-05-15 17:00:29 -03:00
f
5337637cb2 Merge branch 'session' into produccion 2026-05-15 16:39:55 -03:00
f
b734c56e24 feat: configurable session provider 2026-05-15 16:39:04 -03:00
f
b0f52307a5 feat: sign commits 2026-05-14 10:09:39 -03:00
f
40dc068a23 Merge branch 'main' into produccion 2026-05-14 10:03:01 -03:00
f
cbc43eddbc Merge branch 'signing' into produccion 2026-05-13 14:11:45 -03:00
f
b926ad8111 feat: sign commits 2026-05-13 14:10:35 -03:00
f
d5a826c87d Merge branch 's3' into gallinero 2026-05-06 14:45:29 -03:00
f
9daa7de95a Merge branch 's3' into gallinero 2026-05-06 14:43:18 -03:00
f
cd6b9a3ca8 Merge branch 's3' into gallinero 2026-05-06 14:39:23 -03:00
f
6d62a06408 Merge branch 'renovate/codeberg.org-forgejo-forgejo-15.x' into gallinero 2026-05-06 14:39:19 -03:00
8 changed files with 71 additions and 5 deletions

View File

@ -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=*/*
@ -68,6 +72,13 @@ GITEA_STORAGE_TYPE=local
# 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

View File

@ -66,3 +66,16 @@ Note that gitea should be configured to listen to port 2222, i.e. `GITEA_SSH_POR
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
```

View File

@ -1,5 +1,5 @@
export APP_INI_VERSION=v25
export DOCKER_SETUP_SH_VERSION=v1
export APP_INI_VERSION=v28
export DOCKER_SETUP_SH_VERSION=v2
export PG_BACKUP_VERSION=v1
abra_backup_app() {

View File

@ -62,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" }}
@ -126,3 +138,12 @@ 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" }}

View File

@ -10,7 +10,7 @@ services:
secrets:
- db_password
db:
image: postgres:15.18
image: postgres:15.13
deploy:
labels:
backupbot.backup.pre-hook: "/pg_backup.sh backup"

14
compose.signing.yml Normal file
View File

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

View File

@ -65,7 +65,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
@ -73,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"

View File

@ -13,3 +13,10 @@ 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
cat /run/secrets/signing_public_key > /var/lib/gitea/signing_key.pub
cat /run/secrets/signing_private_key > /var/lib/gitea/signing_key
chmod 600 /var/lib/gitea/signing_key*
fi