From 49c5be6f4b1306a3b0f5ee60cda94c6f00d590a5 Mon Sep 17 00:00:00 2001 From: Joshua Higgins Date: Sat, 2 May 2026 16:57:21 -0400 Subject: [PATCH] feat: custom --- .dockerignore | 6 ++++++ Dockerfile | 19 +++++++++++++++++++ README.md | 22 ++++++++++++++++++++-- index.html | 8 +++++++- nginx.conf | 17 +++++++++++++++++ public/opensearch.xml | 13 +++++++++++++ src/bang.ts | 34 +++++++++++++++++----------------- src/global.css | 25 +++++++++++++++++++++++++ src/main.ts | 30 ++++++++++++++++++++++++++++++ 9 files changed, 154 insertions(+), 20 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 nginx.conf create mode 100644 public/opensearch.xml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c2689ef --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +node_modules +dist +.git +.cursor +.DS_Store +npm-debug.log* diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..141cdc0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +# syntax=docker/dockerfile:1 + +FROM node:20-alpine AS build +WORKDIR /app + +COPY package.json ./ +RUN npm install + +COPY . . +RUN npm run build + +FROM nginxinc/nginx-unprivileged:stable-alpine AS runtime + +COPY nginx.conf /etc/nginx/conf.d/default.conf +COPY --from=build /app/dist /usr/share/nginx/html + +EXPOSE 8080 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md index 5bdb01c..c7d95f0 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,29 @@ DuckDuckGo's bang redirects are too slow. Add the following URL as a custom search engine to your browser. Enables all of DuckDuckGo's bangs to work, but much faster. ``` -https://unduck.link?q=%s +https://unduck.abunchofknowitalls.com?q=%s ``` ## How is it that much faster? DuckDuckGo does their redirects server side. Their DNS is...not always great. Result is that it often takes ages. -I solved this by doing all of the work client side. Once you've went to https://unduck.link once, the JS is all cache'd and will never need to be downloaded again. Your device does the redirects, not me. +I solved this by doing all of the work client side. Once you've went to https://unduck.abunchofknowitalls.com once, the JS is all cache'd and will never need to be downloaded again. Your device does the redirects, not me. + +## Docker + +Build the image: + +```sh +docker build -t unduck . +``` + +Run the container: + +```sh +docker run --rm -p 8080:8080 unduck +``` + +The app will then be available at [http://localhost:8080](http://localhost:8080). + +Forked from Theo Browne's [Unduck](https://github.com/T3-Content/unduck) \ No newline at end of file diff --git a/index.html b/index.html index 62ea2a4..e39c462 100644 --- a/index.html +++ b/index.html @@ -18,11 +18,17 @@ as="style" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" /> +