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/*"