Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Extend settings differentiation between Docker and Virtualenv
  • Loading branch information
kthoden committed Sep 15, 2020
1 parent ae80ca2 commit 2dfce90
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/website/settings.py
Expand Up @@ -30,9 +30,12 @@
# xml stylesheets are stored here:
XML_STYLESHEET_DIR = XML_DIR / "stylesheets"
# publications xml files are stored here:
PUBL_XML_DIR = RES_DIR / "publications"
if USE_DOCKER:
PUBL_XML_DIR = XML_INPUT_DIR / "publications"
else:
PUBL_XML_DIR = RES_DIR / "publications"

PUBL_STATIC_DIR = RES_DIR / "all_static_files" / "publications"
PUBL_STATIC_DIR = RES_DIR / "static" / "publications"


# Quick-start development settings - unsuitable for production
Expand Down Expand Up @@ -193,14 +196,16 @@

STATICFILES_DIRS = [
PUBL_STATIC_DIR,
STATIC_ROOT / "webdesign_platform",
RES_DIR / "static" / "webdesign_platform",
]

# Exist DB Settings
if USE_DOCKER:
EXISTDB_SERVER_URL = "http://xmldb:8080/exist"
EXIST_DOMAIN = "xmldb"
else:
EXISTDB_SERVER_URL = "http://localhost:8080/exist"
EXIST_DOMAIN = "localhost"

EXISTDB_SERVER_URL = f"http://{EXIST_DOMAIN}:8080/exist"
EXISTDB_SERVER_USER = 'admin'
EXISTDB_SERVER_PASSWORD = ''
# EXISTDB_ROOT_COLLECTION = '/db/xml_files/publications'

0 comments on commit 2dfce90

Please sign in to comment.