From 252731e75b5955be8889d88a73e2b58fba23480c Mon Sep 17 00:00:00 2001 From: Igor Chubin Date: Mon, 13 Aug 2018 20:42:37 +0000 Subject: [PATCH] minor config fixes --- lib/globals.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/globals.py b/lib/globals.py index 3c3b700..913ba15 100644 --- a/lib/globals.py +++ b/lib/globals.py @@ -8,8 +8,15 @@ import logging import os from pygments.styles import get_all_styles +USE_OS_PACKAGES = True # set to False if you pull cheat sheets repositories from GitHub +DOCKERIZED = False # set to True if the service is running in a Docker container + MYDIR = os.path.abspath(os.path.join(__file__, '..', '..')) -REDISHOST = 'redis' + +if DOCKERIZED: + REDISHOST = 'redis' +else: + REDISHOST = 'localhost' ANSI2HTML = os.path.join(MYDIR, "share/ansi2html.sh") @@ -19,7 +26,6 @@ TEMPLATES = os.path.join(MYDIR, 'share/templates') STATIC = os.path.join(MYDIR, 'share/static') PATH_VIM_ENVIRONMENT = os.path.join(MYDIR, 'share/vim') -USE_OS_PACKAGES = False # change it False if you pull cheat sheets repositories from GitHub if USE_OS_PACKAGES: PATH_TLDR_PAGES = "/home/igor/.tldr/cache/pages/*/*.md" PATH_CHEAT_PAGES = "/usr/local/lib/python2.7/dist-packages/cheat/cheatsheets/*"