From 2152024c1116938d4f2e7662712bc26f947c374c Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Mon, 21 Aug 2023 22:01:43 +0100 Subject: [PATCH] chore: upgrade Forgejo to v1.20.3-0 - Upgrade Forgejo to v1.20.3-0 - Remove the FORGEJO_WORK_DIR environment variable in favour of the WORK_PATH setting in app.ini - Updated storage configuration for avatar, attachements, repo-avatar and repo-archives - Removed unsupported picture config. This is now managed under avatar and repo-avatar config --- config | 2 +- magefiles/forgejo.json | 5 +++++ templates/forgejo/Dockerfile.gotmpl | 3 +-- templates/forgejo/app.ini.gotmpl | 35 +++++++++++++++++++---------- 4 files changed, 30 insertions(+), 15 deletions(-) diff --git a/config b/config index 8bd7221..d17177a 160000 --- a/config +++ b/config @@ -1 +1 @@ -Subproject commit 8bd7221c4a0ec8ab27e15e4410aa0b6b6c615659 +Subproject commit d17177a0636e3e1b89cb2e3891aed2d6e5a1ed12 diff --git a/magefiles/forgejo.json b/magefiles/forgejo.json index 46c8ffe..43e8edf 100644 --- a/magefiles/forgejo.json +++ b/magefiles/forgejo.json @@ -1,5 +1,10 @@ { "downloads": { + "1.20.3-0": { + "binary": "https://codeberg.org/forgejo/forgejo/releases/download/v1.20.3-0/forgejo-1.20.3-0-linux-amd64", + "signature": "https://codeberg.org/forgejo/forgejo/releases/download/v1.20.3-0/forgejo-1.20.3-0-linux-amd64.asc", + "digest": "https://codeberg.org/forgejo/forgejo/releases/download/v1.20.3-0/forgejo-1.20.3-0-linux-amd64.sha256" + }, "1.20.2-0": { "binary": "https://codeberg.org/attachments/48524ed4-efdc-4ac5-8b68-f7d5c77d7672", "signature": "https://codeberg.org/attachments/1dd1f72d-23e1-4c80-ba59-39a22d0bf4a6", diff --git a/templates/forgejo/Dockerfile.gotmpl b/templates/forgejo/Dockerfile.gotmpl index 9980c96..70a60de 100644 --- a/templates/forgejo/Dockerfile.gotmpl +++ b/templates/forgejo/Dockerfile.gotmpl @@ -4,8 +4,7 @@ # syntax=docker/dockerfile:1 FROM alpine:3.18 -ENV FORGEJO_WORK_DIR={{ .Forgejo.Work }} \ - FORGEJO_CUSTOM={{ .Forgejo.Custom }} \ +ENV FORGEJO_CUSTOM={{ .Forgejo.Custom }} \ FORGEJO_APP_INI={{ .Forgejo.AppIni }} \ FORGEJO_BIN={{ .Forgejo.Bin }} \ FORGEJO_VERSION={{ .Forgejo.Version }} \ diff --git a/templates/forgejo/app.ini.gotmpl b/templates/forgejo/app.ini.gotmpl index 99ac903..d4ec137 100644 --- a/templates/forgejo/app.ini.gotmpl +++ b/templates/forgejo/app.ini.gotmpl @@ -1,6 +1,8 @@ -APP_NAME = "{{ .Forgejo.Name }}" -RUN_USER = git -RUN_MODE = {{ .Forgejo.RunMode }} +{{- $app_data_path := printf "%s/git" .Forgejo.DataContainerDirectory -}} +APP_NAME = "{{ .Forgejo.Name }}" +RUN_USER = git +RUN_MODE = {{ .Forgejo.RunMode }} +WORK_PATH = {{ .Forgejo.Work }} [repository] ROOT = {{ .Forgejo.DataContainerDirectory }}/git/repositories @@ -25,7 +27,7 @@ WIKI = never DEFAULT_THEME = forgejo-dark [server] -APP_DATA_PATH = {{ .Forgejo.DataContainerDirectory }}/git +APP_DATA_PATH = {{ $app_data_path }} DOMAIN = {{ .Forgejo.Subdomain }}.{{ .RootDomain }} HTTP_ADDR = {{ .Forgejo.ContainerIpv4Address }} HTTP_PORT = {{ .Forgejo.HttpPort }} @@ -40,9 +42,25 @@ BUILTIN_SSH_SERVER_USER = git LFS_START_SERVER = true LFS_JWT_SECRET = {{ .Forgejo.LfsJwtSecret }} +[attachment] +ENABLED = true +PATH = {{ $app_data_path }}/attachments + [lfs] STORAGE_TYPE = local -PATH = {{ .Forgejo.DataContainerDirectory }}/git/lfs +PATH = {{ $app_data_path }}/lfs + +[avatar] +PATH = {{ $app_data_path }}/avatars + +[repo-avatar] +PATH = {{ $app_data_path }}/repo-avatars + +[repo-archive] +PATH = {{ $app_data_path }}/repo-archive + +[packages] +PATH = {{ $app_data_path }}/packages [ssh.minimum_key_sizes] ED25519 = 256 @@ -86,13 +104,6 @@ DISABLE_REGISTRATION = true [service.explore] REQUIRE_SIGNIN_VIEW = false -[picture] -AVATAR_UPLOAD_PATH = {{ .Forgejo.DataContainerDirectory }}/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = {{ .Forgejo.DataContainerDirectory }}/repo-avatars - -[attachment] -ENABLED = true -PATH = {{ .Forgejo.DataContainerDirectory }}/attachments [log] ROOT_PATH = {{ .Forgejo.DataContainerDirectory }}/log