Upload 2 files
Browse files- config.template.yaml.txt +99 -0
- entrypoint.sh +15 -0
config.template.yaml.txt
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataRoot: ./data
|
| 2 |
+
listen: true
|
| 3 |
+
listenAddress:
|
| 4 |
+
ipv4: 0.0.0.0
|
| 5 |
+
ipv6: '[::]'
|
| 6 |
+
protocol:
|
| 7 |
+
ipv4: true
|
| 8 |
+
ipv6: false
|
| 9 |
+
dnsPreferIPv6: false
|
| 10 |
+
autorunHostname: "auto"
|
| 11 |
+
port: 8000
|
| 12 |
+
autorunPortOverride: -1
|
| 13 |
+
ssl:
|
| 14 |
+
enabled: false
|
| 15 |
+
certPath: "./certs/cert.pem"
|
| 16 |
+
keyPath: "./certs/privkey.pem"
|
| 17 |
+
whitelistMode: true # 模板里保持true或false不重要,脚本会强制修改
|
| 18 |
+
enableForwardedWhitelist: false
|
| 19 |
+
whitelist:
|
| 20 |
+
- ::1
|
| 21 |
+
- 127.0.0.1
|
| 22 |
+
whitelistDockerHosts: true
|
| 23 |
+
basicAuthMode: true
|
| 24 |
+
basicAuthUser:
|
| 25 |
+
username: "${BASIC_AUTH_USER}" # 从 Secret 读取用户名
|
| 26 |
+
password: "${BASIC_AUTH_PASS}" # 从 Secret 读取密码
|
| 27 |
+
enableCorsProxy: false
|
| 28 |
+
requestProxy:
|
| 29 |
+
enabled: false
|
| 30 |
+
url: "socks5://username:password@example.com:1080"
|
| 31 |
+
bypass:
|
| 32 |
+
- localhost
|
| 33 |
+
- 127.0.0.1
|
| 34 |
+
enableUserAccounts: false
|
| 35 |
+
enableDiscreetLogin: false
|
| 36 |
+
autheliaAuth: false
|
| 37 |
+
perUserBasicAuth: false
|
| 38 |
+
sessionTimeout: -1
|
| 39 |
+
disableCsrfProtection: false
|
| 40 |
+
securityOverride: false
|
| 41 |
+
logging:
|
| 42 |
+
enableAccessLog: true
|
| 43 |
+
minLogLevel: 0
|
| 44 |
+
rateLimiting:
|
| 45 |
+
preferRealIpHeader: false
|
| 46 |
+
autorun: false
|
| 47 |
+
avoidLocalhost: false
|
| 48 |
+
backups:
|
| 49 |
+
common:
|
| 50 |
+
numberOfBackups: 50
|
| 51 |
+
chat:
|
| 52 |
+
enabled: true
|
| 53 |
+
checkIntegrity: true
|
| 54 |
+
maxTotalBackups: -1
|
| 55 |
+
throttleInterval: 10000
|
| 56 |
+
thumbnails:
|
| 57 |
+
enabled: true
|
| 58 |
+
format: "jpg"
|
| 59 |
+
quality: 95
|
| 60 |
+
dimensions: { 'bg': [160, 90], 'avatar': [96, 144] }
|
| 61 |
+
performance:
|
| 62 |
+
lazyLoadCharacters: false
|
| 63 |
+
memoryCacheCapacity: '100mb'
|
| 64 |
+
useDiskCache: true
|
| 65 |
+
allowKeysExposure: true
|
| 66 |
+
skipContentCheck: false
|
| 67 |
+
whitelistImportDomains:
|
| 68 |
+
- localhost
|
| 69 |
+
- cdn.discordapp.com
|
| 70 |
+
- files.catbox.moe
|
| 71 |
+
- raw.githubusercontent.com
|
| 72 |
+
requestOverrides: []
|
| 73 |
+
extensions:
|
| 74 |
+
enabled: true
|
| 75 |
+
autoUpdate: false
|
| 76 |
+
models:
|
| 77 |
+
autoDownload: true
|
| 78 |
+
classification: Cohee/distilbert-base-uncased-go-emotions-onnx
|
| 79 |
+
captioning: Xenova/vit-gpt2-image-captioning
|
| 80 |
+
embedding: Cohee/jina-embeddings-v2-base-en
|
| 81 |
+
speechToText: Xenova/whisper-small
|
| 82 |
+
textToSpeech: Xenova/speecht5_tts
|
| 83 |
+
enableDownloadableTokenizers: true
|
| 84 |
+
promptPlaceholder: "[Start a new chat]"
|
| 85 |
+
openai:
|
| 86 |
+
randomizeUserId: false
|
| 87 |
+
captionSystemPrompt: ""
|
| 88 |
+
deepl:
|
| 89 |
+
formality: default
|
| 90 |
+
mistral:
|
| 91 |
+
enablePrefix: false
|
| 92 |
+
ollama:
|
| 93 |
+
keepAlive: -1
|
| 94 |
+
batchSize: -1
|
| 95 |
+
claude:
|
| 96 |
+
enableSystemPromptCache: false
|
| 97 |
+
cachingAtDepth: -1
|
| 98 |
+
enableServerPlugins: true
|
| 99 |
+
enableServerPluginsAutoUpdate: false
|
entrypoint.sh
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# This script runs inside the container when it starts.
|
| 3 |
+
set -e
|
| 4 |
+
|
| 5 |
+
# 1. Generate the initial config.yaml from the template and environment variables (Secrets).
|
| 6 |
+
envsubst < /home/node/app/config.template.yaml > /home/node/app/config.yaml
|
| 7 |
+
|
| 8 |
+
# 2. Forcibly set all necessary plugin-related configurations.
|
| 9 |
+
sed -i 's/^ *whitelistMode:.*$/whitelistMode: false/' /home/node/app/config.yaml
|
| 10 |
+
sed -i 's/^ *enableServerPlugins:.*$/enableServerPlugins: true/' /home/node/app/config.yaml
|
| 11 |
+
sed -i 's/^ *enableServerPluginsAutoUpdate:.*$/enableServerPluginsAutoUpdate: false/' /home/node/app/config.yaml
|
| 12 |
+
sed -i 's/^ *extensions\.enabled:.*$/extensions.enabled: true/' /home/node/app/config.yaml
|
| 13 |
+
|
| 14 |
+
# 3. Start the main application.
|
| 15 |
+
exec node server.js
|