From 46b6c66312ced2e3867ea0c70a998dd8dd580800 Mon Sep 17 00:00:00 2001 From: thomcatdotrocks <37344783+thomcatdotrocks@users.noreply.github.com> Date: Fri, 15 May 2020 18:04:01 -0500 Subject: [PATCH 1/5] Added instructions for running with systemd (#45) Co-authored-by: ThomCat --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index d63450f..b64df24 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,33 @@ pip install -r requirements.txt ./run ``` +#### systemd Configuration +After building the virtual environment, add the following to `/lib/systemd/system/whoogle.service`: + +``` +[Unit] +Description=Whoogle + +[Service] +Type=simple +User=root +WorkingDirectory= +ExecStart=/venv/bin/python3 -um app --host 0.0.0.0 --port 5000 +ExecReload=/bin/kill -HUP $MAINPID +Restart=always +RestartSec=3 +SyslogIdentifier=whoogle + +[Install] +WantedBy=multi-user.target +``` +Then, +``` +sudo systemctl daemon-reload +sudo systemctl enable whoogle +sudo systemctl start whoogle +``` + ### E) Manual (Docker) 1. Ensure the Docker daemon is running, and is accessible by your user account - To add user permissions, you can execute `sudo usermod -aG docker yourusername` From ea37044d67ee185f72dc60ca9a531e5b97f52543 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Fri, 15 May 2020 17:05:46 -0600 Subject: [PATCH 2/5] Minor change to systemd setup I thought this was addressed during the pull request, but I guess not? --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b64df24..88d38a1 100644 --- a/README.md +++ b/README.md @@ -97,7 +97,7 @@ pip install -r requirements.txt ``` #### systemd Configuration -After building the virtual environment, add the following to `/lib/systemd/system/whoogle.service`: +After building the virtual environment, you can add the following to `/lib/systemd/system/whoogle.service` to set up a Whoogle Search systemd service: ``` [Unit] From feae52ac1dabd98e26d3f6a50bb11c14aea05600 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Fri, 15 May 2020 18:25:08 -0600 Subject: [PATCH 3/5] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 13 +++++++------ .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 5cfddc1..1678127 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- name: Bug report about: Create a bug report to help fix an issue with Whoogle -title: "[BUG] " +title: "[BUG] " labels: bug assignees: '' @@ -17,11 +17,12 @@ Steps to reproduce the behavior: 3. Scroll down to '....' 4. See error -**Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. +**Deployment Method** +- [ ] Heroku (one-click deploy) +- [ ] Docker +- [ ] `run` executable +- [ ] pip/pipx +- [ ] Other: **Desktop (please complete the following information):** - OS: [e.g. iOS] diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index d89c925..24bf2f6 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,7 @@ --- name: Feature request about: Suggest a feature that would improve Whoogle -title: '' +title: "[FEATURE] " labels: enhancement assignees: '' From c341848a74ff3f82b6010e381b675efabe3dbb22 Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Fri, 15 May 2020 18:29:21 -0600 Subject: [PATCH 4/5] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 1678127..a174b78 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -22,7 +22,13 @@ Steps to reproduce the behavior: - [ ] Docker - [ ] `run` executable - [ ] pip/pipx -- [ ] Other: +- [ ] Other: [describe setup] + +**Version of Whoogle Search** +- [ ] Latest build from [source] (i.e. GitHub, Docker Hub, pip, etc) +- [ ] Version [version number] +- [ ] Not sure + **Desktop (please complete the following information):** - OS: [e.g. iOS] From 601923e07449befa12c7e527213062370817ae3c Mon Sep 17 00:00:00 2001 From: Ben Busby Date: Sat, 16 May 2020 09:11:00 -0600 Subject: [PATCH 5/5] Update Dockerfile Fixed mkdir call to not error if config dir already exists --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 30ab242..fd8c746 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt ARG config_dir=/config -RUN mkdir $config_dir +RUN mkdir -p $config_dir VOLUME $config_dir ENV CONFIG_VOLUME=$config_dir