Skip to content
Permalink
Browse files

Configurable isso.cfg and comments.db paths

  • Loading branch information...
Sjors committed Apr 30, 2019
1 parent 655ea63 commit e3bb8c473ac4b5e91d39fc0ce4267e4534b3595f
Showing with 4 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +2 −2 app/admin_utils/utils.py
  3. +1 −0 config.py
@@ -6,6 +6,7 @@ key

# config
*.conf
*.cfg
pricing.yaml

# Byte-compiled / optimized / DLL files
@@ -7,12 +7,12 @@ def isso_config():
# isso requires a config file
# this function writes a config file in isso format
# file is saved in a Docker volume shared between lp and isso
file = '/var/lib/config/isso.cfg'
file = current_app.config['ISSO_CONFIG_PATH']
isso_pass = ThirdPartyServices.query.filter_by(
name='isso').first().code
isso_config = ConfigParser()
isso_config['general'] = {}
isso_config['general']['dbpath'] = '/var/lib/db/comments.db'
isso_config['general']['dbpath'] = current_app.config['COMMENTS_DB_PATH']
isso_config['general']['host'] = current_app.config['BLOGGING_SITEURL']
isso_config['admin'] = {}
isso_config['admin']['enabled'] = 'true'
@@ -21,6 +21,7 @@ class Config(object):
BLOGGING_ALLOW_FILE_UPLOAD = True
BLOGGING_ESCAPE_MARKDOWN = False
ISSO_CONFIG_PATH = os.environ.get('ISSO_CONFIG_PATH') or '/var/lib/config/isso.cfg'
COMMENTS_DB_PATH = os.environ.get('COMMENTS_DB_PATH') or '/var/lib/db/comments.db'
COMMENTS = False
COMMENTS_SUBURI = os.environ.get('COMMENTS_SUBURI') is not None
if COMMENTS_SUBURI:

0 comments on commit e3bb8c4

Please sign in to comment.
You can’t perform that action at this time.