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/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml new file mode 100644 index 0000000..8d041d4 --- /dev/null +++ b/.gitea/workflows/docker-build.yml @@ -0,0 +1,39 @@ +name: Docker Image CI + +on: + workflow_dispatch: + push: + branches: + - custom + +jobs: + build-and-push: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Log in to Gitea Container Registry + uses: docker/login-action@v3 + with: + registry: git.abunchofknowitalls.com + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + + - name: Extract metadata for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: git.abunchofknowitalls.com/${{ gitea.repository }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} 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..31e08c0 100644 --- a/README.md +++ b/README.md @@ -3,11 +3,13 @@ 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. + +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..8b48309 100644 --- a/index.html +++ b/index.html @@ -18,17 +18,18 @@ as="style" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" /> + -