From 9182f1108f83abda36166e11607d75dc6e95819c Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 12 May 2020 22:10:20 +0100 Subject: [PATCH] Remove reference to 8888 port It wasn't really used anywhere, and setting it to 5000 everywhere removes ambiguity, and makes things easier to track and reason about --- README.md | 10 +++++----- app/routes.py | 4 ++-- docker-compose.yml | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 818289b..4a2afd8 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,11 @@ Provides: - Downtime after periods of inactivity \([solution](https://github.com/benbusby/whoogle-search#prevent-downtime-heroku-only)\) ### B) [pipx](https://github.com/pipxproject/pipx#install-pipx) -Persistent install: +Persistent install: `pipx install git+https://github.com/benbusby/whoogle-search.git` -Sandboxed temporary instance: +Sandboxed temporary instance: `pipx run git+https://github.com/benbusby/whoogle-search.git whoogle-search` @@ -76,7 +76,7 @@ Whoogle Search console runner optional arguments: -h, --help show this help message and exit - --port Specifies a port to run on (default 8888) + --port Specifies a port to run on (default 5000) --host Specifies the host address to use (default 127.0.0.1) --debug Activates debug mode for the Flask server (default False) ``` @@ -104,7 +104,7 @@ pip install -r requirements.txt git clone https://github.com/benbusby/whoogle-search.git cd whoogle-search docker build --tag whooglesearch:1.0 . -docker run --publish 8888:5000 --detach --name whooglesearch whooglesearch:1.0 +docker run --publish 5000:5000 --detach --name whooglesearch whooglesearch:1.0 ``` And kill with: `docker rm --force whooglesearch` @@ -172,7 +172,7 @@ A good solution for this is to set up a simple cronjob on any device at your hom For instance, adding `*/20 7-23 * * * curl https://.herokuapp.com > /home//whoogle-refresh` will fetch the home page of the app every 20 minutes between 7am and midnight, allowing for downtime from midnight to 7am. And again, this wouldn't be a hard limit - you'd still have plenty of remaining hours of uptime each month in case you were searching after this window has closed. -Since the instance is destroyed and rebuilt after inactivity, config settings will be reset once the app enters downtime. If you have configuration settings active that you'd like to keep between periods of downtime (like dark mode for example), you could instead add `*/20 7-23 * * * curl -d "dark=1" -X POST https://.herokuapp.com/config > /home//whoogle-refresh` to keep these settings more or less permanent, and still keep the app from entering downtime when you're using it. +Since the instance is destroyed and rebuilt after inactivity, config settings will be reset once the app enters downtime. If you have configuration settings active that you'd like to keep between periods of downtime (like dark mode for example), you could instead add `*/20 7-23 * * * curl -d "dark=1" -X POST https://.herokuapp.com/config > /home//whoogle-refresh` to keep these settings more or less permanent, and still keep the app from entering downtime when you're using it. Available config values are `near`, `nojs`, `dark` and `url`. ## FAQ diff --git a/app/routes.py b/app/routes.py index 09c39a8..6977be3 100644 --- a/app/routes.py +++ b/app/routes.py @@ -146,8 +146,8 @@ def window(): def run_app(): parser = argparse.ArgumentParser(description='Whoogle Search console runner') - parser.add_argument('--port', default=8888, metavar='', - help='Specifies a port to run on (default 8888)') + parser.add_argument('--port', default=5000, metavar='', + help='Specifies a port to run on (default 5000)') parser.add_argument('--host', default='127.0.0.1', metavar='', help='Specifies the host address to use (default 127.0.0.1)') parser.add_argument('--debug', default=False, action='store_true', diff --git a/docker-compose.yml b/docker-compose.yml index c6c9ced..479b7f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,5 +5,5 @@ services: image: benbusby/whoogle-search container_name: whoogle-search ports: - - 8888:5000 + - 5000:5000 restart: unless-stopped