From e21341d6f4338130c22488a7e96becd7727b833f Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Fri, 24 Apr 2020 17:23:08 -0600 Subject: [PATCH] Deployment related refactoring, fixes to Dockerfile - Updated Dockerfile to include chmod of run script - Added app.json for Heroku quick deploy - Removed unused function var in js controller - Moved requirements back to root of repo - Added Codebeat report to readme --- Dockerfile | 3 ++- README.md | 1 + app.json | 9 +++++++++ app/static/js/controller.js | 2 +- config/requirements.txt => requirements.txt | 0 5 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 app.json rename config/requirements.txt => requirements.txt (100%) diff --git a/Dockerfile b/Dockerfile index dc0e92c..46f11f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,7 @@ FROM python:3 WORKDIR /usr/src/app COPY . . -RUN pip install --no-cache-dir -r config/requirements.txt +RUN pip install --no-cache-dir -r requirements.txt +RUN chmod +x ./run CMD ["./run"] diff --git a/README.md b/README.md index 9bf4e8d..3cae2d9 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ___ [![Latest Release](https://img.shields.io/github/v/release/benbusby/shoogle)](https://github.com/benbusby/shoogle/releases) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Build Status](https://travis-ci.com/benbusby/shoogle.svg?token=JgVbn8LSCz5Mmr9h5qq7&branch=master)](https://travis-ci.com/benbusby/shoogle) +[![codebeat badge](https://codebeat.co/badges/e96cada2-fb6f-4528-8285-7d72abd74e8d)](https://codebeat.co/projects/github-com-benbusby-shoogle-master) Get Google search results, but without any ads, javascript, AMP links, or tracking. Easily deployable as a Docker app, and customizable with a single config file. Quick and simple to implement as a primary search engine replacement on both desktop and mobile. diff --git a/app.json b/app.json new file mode 100644 index 0000000..eb8f5ab --- /dev/null +++ b/app.json @@ -0,0 +1,9 @@ +{ + "name": "Shoogle Search", + "description": "A lightweight, privacy-oriented, containerized Google search proxy for desktop/mobile that removes Javascript, AMP links, and ads/sponsored content", + "repository": "https://github.com/benbusby/shoogle", + "logo": "https://raw.githubusercontent.com/benbusby/shoogle/master/app/static/img/favicon/ms-icon-150x150.png", + "keywords": ["search", "metasearch", "flask", "docker", "heroku", "adblock", "degoogle", "privacy"], + "image": "heroku/python" +} + diff --git a/app/static/js/controller.js b/app/static/js/controller.js index b64983b..094cf67 100644 --- a/app/static/js/controller.js +++ b/app/static/js/controller.js @@ -54,7 +54,7 @@ document.addEventListener("DOMContentLoaded", function() { let configSettings = JSON.parse(xhrGET.responseText); nearConfig.value = configSettings["near"] ? configSettings["near"] : ""; - nearConfig.addEventListener("keyup", function(event) { + nearConfig.addEventListener("keyup", function() { configSettings["near"] = nearConfig.value; }); diff --git a/config/requirements.txt b/requirements.txt similarity index 100% rename from config/requirements.txt rename to requirements.txt