diff --git a/dashboard/backend/config.py b/dashboard/backend/config.py index d031afe..8aef98a 100644 --- a/dashboard/backend/config.py +++ b/dashboard/backend/config.py @@ -71,6 +71,7 @@ EXTERNAL_SERVICES = { "stirling_pdf": os.environ.get("STIRLING_PDF_URL", "https://pdf.jimmygan.com"), "vaultwarden": os.environ.get("VAULTWARDEN_URL", "https://vault.jimmygan.com"), "n8n": os.environ.get("N8N_URL", "https://n8n.jimmygan.com"), + "reasonix": os.environ.get("REASONIX_URL", "https://code.jimmygan.com"), "speedtest": os.environ.get("SPEEDTEST_URL", "https://speed.jimmygan.com"), "openconnector": os.environ.get("OPENCONNECTOR_URL", "https://connector.jimmygan.com"), } diff --git a/dashboard/frontend/src/components/Sidebar.svelte b/dashboard/frontend/src/components/Sidebar.svelte index 4891bb5..bfaf5da 100644 --- a/dashboard/frontend/src/components/Sidebar.svelte +++ b/dashboard/frontend/src/components/Sidebar.svelte @@ -62,6 +62,7 @@ { label: "Stirling PDF", remoteHref: "https://pdf.jimmygan.com", icon: "pdf", external: true }, { label: "Vaultwarden", remoteHref: "https://vault.jimmygan.com", icon: "lock", external: true }, { label: "n8n", remoteHref: "https://n8n.jimmygan.com", icon: "n8n", external: true }, + { label: "Reasonix", remoteHref: "https://code.jimmygan.com", icon: "code", external: true }, { label: "Speedtest", remoteHref: "https://speed.jimmygan.com", icon: "speedtest", external: true }, { label: "OpenConnector", remoteHref: "https://connector.jimmygan.com", port: 3002, icon: "link", external: true }, ]; diff --git a/reasonix/.env.example b/reasonix/.env.example new file mode 100644 index 0000000..2f379c6 --- /dev/null +++ b/reasonix/.env.example @@ -0,0 +1,2 @@ +# DeepSeek API key for litellm proxy +DEEPSEEK_LOCAL_API_KEY=sk-your-key-here diff --git a/reasonix/docker-compose.yml b/reasonix/docker-compose.yml new file mode 100644 index 0000000..0332fcd --- /dev/null +++ b/reasonix/docker-compose.yml @@ -0,0 +1,39 @@ +services: + reasonix: + image: node:alpine + container_name: reasonix + restart: unless-stopped + labels: + - "com.centurylinklabs.watchtower.enable=false" + ports: + - "127.0.0.1:8787:8787" + environment: + - DEEPSEEK_LOCAL_API_KEY=${DEEPSEEK_LOCAL_API_KEY} + - TZ=Asia/Shanghai + volumes: + - ./reasonix.toml:/home/node/.reasonix/config.toml:ro + - ./data:/home/node/.reasonix + networks: + - nas-dashboard_internal + working_dir: /home/node + user: node + command: + - sh + - -c + - | + npm install -g reasonix@1.17.10 + reasonix serve --addr 0.0.0.0:8787 --auth none + healthcheck: + test: ["CMD", "wget", "-q", "--spider", "http://localhost:8787"] + interval: 30s + timeout: 5s + retries: 3 + logging: + driver: json-file + options: + max-size: "10m" + max-file: "3" + +networks: + nas-dashboard_internal: + external: true diff --git a/reasonix/reasonix.toml b/reasonix/reasonix.toml new file mode 100644 index 0000000..3c04b77 --- /dev/null +++ b/reasonix/reasonix.toml @@ -0,0 +1,6 @@ +[providers] +deepseek-flash = { kind = "openai", base_url = "http://litellm:4005", model = "deepseek-v4-flash", api_key_env = "DEEPSEEK_LOCAL_API_KEY", context_window = 1000000 } +deepseek-pro = { kind = "openai", base_url = "http://litellm:4005", model = "deepseek-v4-pro", api_key_env = "DEEPSEEK_LOCAL_API_KEY", context_window = 1000000 } + +[defaults] +model = "deepseek-flash" diff --git a/tmp_remote/Caddyfile_nas b/tmp_remote/Caddyfile_nas index daa1457..52b5a7c 100755 --- a/tmp_remote/Caddyfile_nas +++ b/tmp_remote/Caddyfile_nas @@ -141,6 +141,17 @@ vault.jimmygan.com { reverse_proxy 127.0.0.1:8222 } +code.jimmygan.com { + tls { + dns cloudflare {env.CLOUDFLARE_API_TOKEN} + } + forward_auth 127.0.0.1:9092 { + uri /api/verify?rd=https://auth.jimmygan.com:8443 + copy_headers Remote-User Remote-Groups Remote-Name Remote-Email + } + reverse_proxy 127.0.0.1:8787 +} + speed.jimmygan.com { tls { dns cloudflare {env.CLOUDFLARE_API_TOKEN} diff --git a/tmp_remote/Caddyfile_vps b/tmp_remote/Caddyfile_vps index 6fbb557..1240e70 100644 --- a/tmp_remote/Caddyfile_vps +++ b/tmp_remote/Caddyfile_vps @@ -66,3 +66,9 @@ photos-app.jimmygan.com { } } } + +code.jimmygan.com { + import security_headers + import authelia + reverse_proxy 100.78.131.124:8787 +}