adapted deployment configs

This commit is contained in:
Luis Aleixo 2023-05-09 17:17:52 +02:00
parent 7fd0e0f8ec
commit 18978aef20
3 changed files with 4 additions and 3 deletions

View file

@ -20,7 +20,7 @@ services:
- APPLICATION_ROOT=/
- CAIMIRA_CALCULATOR_PREFIX=/calculator-cern
- CAIMIRA_THEME=caimira/apps/templates/cern
- EXTRA_PAGES=[{"url":"/about","filename":"about", "is_root":True},{"url":"/user-guide","filename":"userguide","is_root":False}]
- EXTRA_PAGES=[{"url_path":"/about","filename":"about.html.j2"},{"url_path":"/calculator/user-guide","filename":"userguide.html.j2"}]
user: ${CURRENT_UID}
calculator-open-app:
@ -30,7 +30,7 @@ services:
- APP_NAME=calculator-app
- APPLICATION_ROOT=/
- CAIMIRA_CALCULATOR_PREFIX=/calculator-open
- EXTRA_PAGES=[{"url":"/about","filename":"about", "is_root":True},{"url":"/user-guide","filename":"userguide","is_root":False}]
- EXTRA_PAGES=[{"url_path":"/about","filename":"about.html.j2"},{"url_path":"/calculator/user-guide","filename":"userguide.html.j2"}]
user: ${CURRENT_UID}
auth-service:

View file

@ -284,7 +284,7 @@
key: ARVE_API_KEY
name: arve-api
- name: EXTRA_PAGES
value: '[{"url":"/about","filename":"about","is_root":True},{"url":"/user-guide","filename":"userguide","is_root":False}]'
value: '[{"url_path":"/about","filename":"about.html.j2"},{"url_path":"/calculator/user-guide","filename":"userguide.html.j2"}]'
image: '${PROJECT_NAME}/calculator-app'
ports:
- containerPort: 8080

View file

@ -374,6 +374,7 @@ def make_app(
# Any extra generic page must be declared in the env. variable "EXTRA_PAGES"
extra_pages: typing.Union[str, typing.List] = os.environ.get('EXTRA_PAGES', [])
pages: typing.List = []
try:
pages = ast.literal_eval(extra_pages) # type: ignore
except (SyntaxError, ValueError):