diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-11 09:51:57 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-11 09:51:57 +0100 |
commit | 2992eced7e449e8ace4840384c20be6564358fab (patch) | |
tree | 8d183398a8fb644df23b568ca9b34b3e034a31b2 | |
parent | Updated README. (diff) | |
download | newspipe-2992eced7e449e8ace4840384c20be6564358fab.tar.gz newspipe-2992eced7e449e8ace4840384c20be6564358fab.tar.bz2 newspipe-2992eced7e449e8ace4840384c20be6564358fab.zip |
Updated README.
-rw-r--r-- | README.md | 14 | ||||
-rw-r--r-- | instance/production.py | 2 | ||||
-rw-r--r-- | instance/sqlite.py | 2 |
3 files changed, 10 insertions, 8 deletions
@@ -37,7 +37,7 @@ Newspipe is really easy to deploy. ### Requirements ```bash -$ sudo apt-get install npm postgresql +$ sudo apt-get install npm ``` ## Configure and install the application @@ -47,19 +47,21 @@ $ git clone https://git.sr.ht/~cedric/newspipe $ cd newspipe/ $ npm install $ poetry install -$ cp instance/production.py instance/development.py +$ export Newspipe_CONFIG=sqlite.py $ poetry shell $ python manager.py db_create $ python runserver.py * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit) ``` -If you want to use SQLite you do not need to install PostgreSQL. Simply use -the provided configuration file (in ``instance/sqlite.py``) thank to this -environment variable: +If you want to use PostgreSQL you can customize +the provided example configuration file (in ``instance/production.py``): ```bash -export Newspipe_CONFIG=sqlite.py +$ sudo apt-get install postgresql +$ cp instance/production.py instance/postgresql.py +$ vim instance/postgresql.py # customize it +$ export Newspipe_CONFIG=postgresql.py ``` ## License diff --git a/instance/production.py b/instance/production.py index 37f8ee4a..798c5a04 100644 --- a/instance/production.py +++ b/instance/production.py @@ -29,7 +29,7 @@ SQLALCHEMY_DATABASE_URI = "postgres://{user}:{password}@{host}:{port}/{name}".fo # Crawler CRAWLING_METHOD = "default" -DEFAULT_MAX_ERROR = 3 +DEFAULT_MAX_ERROR = 6 HTTP_PROXY = "" CRAWLER_USER_AGENT = "Newspipe (https://git.sr.ht/~cedric/newspipe)" CRAWLER_TIMEOUT = 30 diff --git a/instance/sqlite.py b/instance/sqlite.py index b307eaca..fd6438cb 100644 --- a/instance/sqlite.py +++ b/instance/sqlite.py @@ -20,7 +20,7 @@ SQLALCHEMY_DATABASE_URI = "sqlite:///newspipe.db" # Crawler CRAWLING_METHOD = "default" -DEFAULT_MAX_ERROR = 3 +DEFAULT_MAX_ERROR = 6 HTTP_PROXY = "" CRAWLER_USER_AGENT = "Newspipe (https://git.sr.ht/~cedric/newspipe)" CRAWLER_TIMEOUT = 30 |