aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2024-11-03 19:44:19 +0800
committercrupest <crupest@outlook.com>2024-11-03 19:44:19 +0800
commit2f5a6d7d6d96cfc43a3f48734f797768f7af94b6 (patch)
tree3d1f2ae694d44c6667ecadf06b9cb32d04a00675
parentc50ea3f9348115fe150857664f89382e954a6e14 (diff)
downloadcrupest-2f5a6d7d6d96cfc43a3f48734f797768f7af94b6.tar.gz
crupest-2f5a6d7d6d96cfc43a3f48734f797768f7af94b6.tar.bz2
crupest-2f5a6d7d6d96cfc43a3f48734f797768f7af94b6.zip
fix(forgejo): change the way to save secrets.
-rw-r--r--template/forgejo.app.ini.template8
-rw-r--r--tools/aio/modules/config.py8
2 files changed, 4 insertions, 12 deletions
diff --git a/template/forgejo.app.ini.template b/template/forgejo.app.ini.template
index c77dd75..3bd44c4 100644
--- a/template/forgejo.app.ini.template
+++ b/template/forgejo.app.ini.template
@@ -8,15 +8,15 @@ HTTP_PORT = 3000
ROOT_URL = https://git.${CRUPEST_DOMAIN}
DISABLE_SSH = true
LFS_START_SERVER = true
-LFS_JWT_SECRET = ${CRUPEST_FORGEJO_LFS_JWT_SECRET}
+LFS_JWT_SECRET_URI = file:/data/forgejo-secret/lfs_jwt_secret
[database]
DB_TYPE = sqlite3
[security]
INSTALL_LOCK = false
-SECRET_KEY = ${CRUPEST_FORGEJO_SECURITY_KEY}
-INTERNAL_TOKEN = ${CRUPEST_FORGEJO_SECURITY_INTERNAL_TOKEN}
+SECRET_KEY_URI = file:/data/forgejo-secret/secret_key
+INTERNAL_TOKEN_URI = file:/data/forgejo-secret/internal_token
REVERSE_PROXY_LIMIT = 1
REVERSE_PROXY_TRUSTED_PROXIES = *
@@ -39,7 +39,7 @@ MODE = console,file
ENABLED = true
[oauth2]
-JWT_SECRET = ${CRUPEST_FORGEJO_OAUTH2_JWT_SECRET}
+JWT_SECRET_URI = file:/data/forgejo-secret/oauth2_jwt_secret
[actions]
ENABLED = false
diff --git a/tools/aio/modules/config.py b/tools/aio/modules/config.py
index 52f656a..962e418 100644
--- a/tools/aio/modules/config.py
+++ b/tools/aio/modules/config.py
@@ -55,14 +55,6 @@ config_var_list: list = [
"v2ray user id", generate_uuid),
ConfigVar("CRUPEST_V2RAY_PATH",
"v2ray path, which will be prefixed by _", generate_uuid),
- ConfigVar("CRUPEST_FORGEJO_SECURITY_KEY",
- "Forgejo secret key.", generate_uuid),
- ConfigVar("CRUPEST_FORGEJO_SECURITY_INTERNAL_TOKEN",
- "Forgejo secret internal token.", generate_uuid),
- ConfigVar("CRUPEST_FORGEJO_LFS_JWT_SECRET",
- "Forgejo LFS JWT secret.", generate_uuid),
- ConfigVar("CRUPEST_FORGEJO_OAUTH2_JWT_SECRET",
- "Forgejo OAUTH2 JWT secret..", generate_uuid),
ConfigVar("CRUPEST_FORGEJO_MAILER_USER",
"Forgejo SMTP user.", "Please input your Forgejo SMTP user."),
ConfigVar("CRUPEST_FORGEJO_MAILER_PASSWD",