Compare commits

..
1 Commits
Author SHA1 Message Date
gib 0aba66d3df Fix some small errors & stuff to host it on my home server now 2025-12-18 12:42:09 -06:00
8 changed files with 1225 additions and 1078 deletions

No files matched your search

+5 -2
View File
@@ -1,4 +1,7 @@
### Docker Environment Variables ###
DOMAIN="example.com"
### Vite Environment Variables ###
# All environment variables must be prefixed with VITE_ to be seen by client.
# Self-hosted Services URLs. Do not include the trailing slash.
VITE_BANG_URL="https://bang."
@@ -22,5 +25,5 @@ VITE_DEFAULT_BANG="s"
VITE_LLAMA_MODEL="llama3.1" # !llama
VITE_DEEPSEEK_MODEL="deepseek-r1:8b" # !r1
# Remote
VITE_OPENAI_MODEL="gpt-4o-mini" # !openai
VITE_CLAUDE_MODEL="anthropic/claude-3.5-sonnet" # !claude
VITE_OPENAI_MODEL="gpt-5.2"
VITE_CLAUDE_MODEL="anthropic.claude-sonnet-4-5-20250929"
+1 -1
View File
@@ -10,7 +10,7 @@ services:
container_name: bang
env_file: [../.env]
hostname: bang
domainname: ${VITE_BANG_URL}
domainname: bang.${DOMAIN}
networks: [nginx-bridge]
stdin_open: true
tty: true
+2 -7
View File
@@ -2,19 +2,14 @@
Description=Podman Compose: Bang
After=network-online.target
Wants=network-online.target
StartLimitIntervalSec=300
StartLimitBurst=3
[Service]
Type=oneshot
WorkingDirectory=%h/Server/Search/Bang/docker
WorkingDirectory=/home/gib/Server/Search/Bang/docker
ExecStart=/usr/bin/podman compose up -d
ExecStop=/usr/bin/podman compose down
RemainAfterExit=yes
TimeoutStartSec=900
TimeoutStopSec=60
Restart=on-failure
RestartSec=30
[Install]
WantedBy=default.target
WantedBy=multi-user.target
+6 -5
View File
@@ -10,15 +10,16 @@
"preview": "vite preview"
},
"devDependencies": {
"@types/node": "^25.6.0",
"@types/node": "^22.19.3",
"dotenv": "^17.2.3",
"ts-node": "^10.9.2",
"typescript": "~6.0.3",
"vite": "^8.0.8"
"typescript": "~5.7.3",
"vite": "^6.4.1"
},
"dependencies": {
"vite-plugin-pwa": "^1.2.0"
"vite-plugin-pwa": "^0.21.2"
},
"packageManager": "pnpm@10.10.0+sha512.d615db246fe70f25dcfea6d8d73dee782ce23e2245e3c4f6f888249fb568149318637dca73c2c5c8ef2a4ca0d5657fb9567188bfab47f566d1ee6ce987815c39",
"packageManager": "pnpm@10.26.0+sha512.3b3f6c725ebe712506c0ab1ad4133cf86b1f4b687effce62a9b38b4d72e3954242e643190fc51fa1642949c735f403debd44f5cb0edd657abe63a8b6a7e1e402",
"pnpm": {
"onlyBuiltDependencies": [
"esbuild"
+1191 -1055
View File
File diff suppressed because it is too large. Load diff
+4 -4
View File
@@ -3,8 +3,8 @@
<ShortName>Bang!</ShortName>
<Description>A better default search engine with bangs</Description>
<InputEncoding>UTF-8</InputEncoding>
<Image width="16" height="16" type="image/svg+xml">https://bang.gibbyb.com/bang.svg</Image>
<Url type="text/html" method="get" template="https://bang.gibbyb.com?q={searchTerms}"/>
<Url type="application/opensearchdescription+xml" rel="self" template="https://bang.gibbyb.com/opensearch.xml"/>
<moz:SearchForm xmlns:moz="http://www.mozilla.org/2006/browser/search/">https://bang.gibbyb.com</moz:SearchForm>
<Image width="16" height="16" type="image/svg+xml">https://bang.gbrown.org/bang.svg</Image>
<Url type="text/html" method="get" template="https://bang.gbrown.org?q={searchTerms}"/>
<Url type="application/opensearchdescription+xml" rel="self" template="https://bang.gbrown.org/opensearch.xml"/>
<moz:SearchForm xmlns:moz="http://www.mozilla.org/2006/browser/search/">https://bang.gbrown.org</moz:SearchForm>
</OpenSearchDescription>
+6 -1
View File
@@ -1,13 +1,18 @@
import * as fs from 'node:fs';
import * as path from 'node:path';
import { fileURLToPath } from 'node:url';
import 'dotenv/config';
// Get the current file's directory
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
if (!process.env.VITE_BANG_URL) {
console.error('VITE_BANG_URL environment variable must be set.');
}
// Get the Bang URL from environment or use a default for local development
const bangUrl = process.env.VITE_BANG_URL || 'https://bang.gibbyb.com';
const bangUrl = process.env.VITE_BANG_URL;
// Create the OpenSearch XML content
const openSearchXml = `<?xml version="1.0" encoding="UTF-8"?>
+10 -3
View File
@@ -1,8 +1,6 @@
// This file was (mostly) ripped from https://duckduckgo.com/bang.js
// SearXNG removed 2026-08-11: the VPS instance was decommissioned (datacenter IP was
// being CAPTCHA'd/403'd by most engines). The "!s" bang went with it; "!g" (Google) is
// now the default, set via VITE_DEFAULT_BANG in .env.
const SEARXNG_URL = import.meta.env.VITE_SEARXNG_URL as string;
const GITEA_URL = import.meta.env.VITE_GITEA_URL as string;
const OPENWEBUI_URL = import.meta.env.VITE_OPENWEBUI_URL as string;
const PLEX_URL = import.meta.env.VITE_PLEX_URL as string;
@@ -17,6 +15,15 @@ const OPENAI_MODEL = import.meta.env.VITE_OPENAI_MODEL as string;
const CLAUDE_MODEL = import.meta.env.VITE_CLAUDE_MODEL.replace("/", "%2F") as string;
export const bangs = [
{
c: "Online Services",
d: SEARXNG_URL,
r: 0,
s: "Searxng",
sc: "Search",
t: "s",
u: `${SEARXNG_URL}/?q={{{s}}}`,
},
{
c: "Tech",
d: GITEA_URL,