diff --git a/playbooks/openshift-apps/noggin.yml b/playbooks/openshift-apps/noggin.yml index be4b1360f4..e8c0ca6140 100644 --- a/playbooks/openshift-apps/noggin.yml +++ b/playbooks/openshift-apps/noggin.yml @@ -65,6 +65,7 @@ template: configmap.yml objectname: configmap.yml noggin_theme: fas + subdir: "/accounts" - role: openshift/ipa-client app: noggin @@ -98,6 +99,7 @@ app: noggin template: deploymentconfig.yml objectname: deploymentconfig.yml + subdir: "/accounts" # - role: openshift/start-build # app: noggin diff --git a/roles/openshift-apps/noggin/templates/deploymentconfig.yml b/roles/openshift-apps/noggin/templates/deploymentconfig.yml index fbf7d241d6..4743a8e60b 100644 --- a/roles/openshift-apps/noggin/templates/deploymentconfig.yml +++ b/roles/openshift-apps/noggin/templates/deploymentconfig.yml @@ -69,21 +69,23 @@ spec: value: "deploy.wsgi" - name: APP_CONFIG value: "/etc/noggin/gunicorn.conf.py" + {% if subdir %} - name: SCRIPT_NAME - value: "/accounts" + value: "{{ subdir }}" + {% endif %} readinessProbe: timeoutSeconds: 10 initialDelaySeconds: 5 periodSeconds: 60 httpGet: - path: /accounts/healthz/ready + path: "{{ subdir }}/healthz/ready" port: 8080 livenessProbe: timeoutSeconds: 10 initialDelaySeconds: 10 periodSeconds: 60 httpGet: - path: /accounts/healthz/live + path: "{{ subdir }}/healthz/live" port: 8080 volumes: - name: noggin-config-volume diff --git a/roles/openshift-apps/noggin/templates/noggin.cfg.py b/roles/openshift-apps/noggin/templates/noggin.cfg.py index d7cdca8990..e5c19e87c4 100644 --- a/roles/openshift-apps/noggin/templates/noggin.cfg.py +++ b/roles/openshift-apps/noggin/templates/noggin.cfg.py @@ -7,8 +7,10 @@ def from_file(path): return open(path, 'r').read().strip() +{% if subdir %} # Deployed to a subpath -APPLICATION_ROOT = '/accounts/' +APPLICATION_ROOT = '{{ subdir }}/' +{% endif %} # IPA settings FREEIPA_SERVERS = ['{{ ipa_server }}']