diff options
author | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 22:04:03 +0100 |
---|---|---|
committer | Cédric Bonhomme <cedric@cedricbonhomme.org> | 2020-03-10 22:04:03 +0100 |
commit | f660173dcb84f07e2160b1aee7093c075f85228f (patch) | |
tree | 1b0ee795b36f7d15bca91e116f699d121b22252d | |
parent | added a way to specify a configuration file via an environment variable (diff) | |
download | newspipe-f660173dcb84f07e2160b1aee7093c075f85228f.tar.gz newspipe-f660173dcb84f07e2160b1aee7093c075f85228f.tar.bz2 newspipe-f660173dcb84f07e2160b1aee7093c075f85228f.zip |
Added SQLite configuration file.
-rw-r--r-- | instance/production.py | 4 | ||||
-rw-r--r-- | instance/sqlite.py | 48 |
2 files changed, 52 insertions, 0 deletions
diff --git a/instance/production.py b/instance/production.py index e5c43190..37f8ee4a 100644 --- a/instance/production.py +++ b/instance/production.py @@ -1,5 +1,9 @@ import os +# +# Example configuration file for a PostgreSQL database. +# + # Webserver HOST = "127.0.0.1" PORT = 5000 diff --git a/instance/sqlite.py b/instance/sqlite.py new file mode 100644 index 00000000..b307eaca --- /dev/null +++ b/instance/sqlite.py @@ -0,0 +1,48 @@ +import os + +# +# Example configuration file for a SQLite database. +# + +# Webserver +HOST = "127.0.0.1" +PORT = 5000 +DEBUG = False +API_ROOT = "/api/v2.0" + +CSRF_ENABLED = True +SECRET_KEY = "LCx3BchmHRxFzkEv4BqQJyeXRLXenf" +SECURITY_PASSWORD_SALT = "L8gTsyrpRQEF8jNWQPyvRfv7U5kJkD" +TOKEN_VALIDITY_PERIOD = 3600 + +# Database +SQLALCHEMY_DATABASE_URI = "sqlite:///newspipe.db" + +# Crawler +CRAWLING_METHOD = "default" +DEFAULT_MAX_ERROR = 3 +HTTP_PROXY = "" +CRAWLER_USER_AGENT = "Newspipe (https://git.sr.ht/~cedric/newspipe)" +CRAWLER_TIMEOUT = 30 +CRAWLER_RESOLV = False +RESOLVE_ARTICLE_URL = False +FEED_REFRESH_INTERVAL = 120 + +# Notification +MAIL_SERVER = "localhost" +MAIL_PORT = 25 +MAIL_USE_TLS = False +MAIL_USE_SSL = False +MAIL_DEBUG = DEBUG +MAIL_USERNAME = None +MAIL_PASSWORD = None +MAIL_DEFAULT_SENDER = "admin@admin.localhost" + +# Misc +BASE_DIR = os.path.abspath(os.path.dirname(".")) +LANGUAGES = {"en": "English", "fr": "French"} +TIME_ZONE = {"en": "US/Eastern", "fr": "Europe/Paris"} +ADMIN_EMAIL = "admin@admin.localhost" +LOG_LEVEL = "info" +LOG_PATH = "./var/newspipe.log" +SELF_REGISTRATION = True |