The CentOS instance is not deployed to a subdir

Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
This commit is contained in:
Aurélien Bompard 2020-11-30 14:33:16 +01:00
parent 47580ceefd
commit e241080514
No known key found for this signature in database
GPG key ID: 31584CFEB9BF64AD
3 changed files with 10 additions and 4 deletions

View file

@ -65,6 +65,7 @@
template: configmap.yml template: configmap.yml
objectname: configmap.yml objectname: configmap.yml
noggin_theme: fas noggin_theme: fas
subdir: "/accounts"
- role: openshift/ipa-client - role: openshift/ipa-client
app: noggin app: noggin
@ -98,6 +99,7 @@
app: noggin app: noggin
template: deploymentconfig.yml template: deploymentconfig.yml
objectname: deploymentconfig.yml objectname: deploymentconfig.yml
subdir: "/accounts"
# - role: openshift/start-build # - role: openshift/start-build
# app: noggin # app: noggin

View file

@ -69,21 +69,23 @@ spec:
value: "deploy.wsgi" value: "deploy.wsgi"
- name: APP_CONFIG - name: APP_CONFIG
value: "/etc/noggin/gunicorn.conf.py" value: "/etc/noggin/gunicorn.conf.py"
{% if subdir %}
- name: SCRIPT_NAME - name: SCRIPT_NAME
value: "/accounts" value: "{{ subdir }}"
{% endif %}
readinessProbe: readinessProbe:
timeoutSeconds: 10 timeoutSeconds: 10
initialDelaySeconds: 5 initialDelaySeconds: 5
periodSeconds: 60 periodSeconds: 60
httpGet: httpGet:
path: /accounts/healthz/ready path: "{{ subdir }}/healthz/ready"
port: 8080 port: 8080
livenessProbe: livenessProbe:
timeoutSeconds: 10 timeoutSeconds: 10
initialDelaySeconds: 10 initialDelaySeconds: 10
periodSeconds: 60 periodSeconds: 60
httpGet: httpGet:
path: /accounts/healthz/live path: "{{ subdir }}/healthz/live"
port: 8080 port: 8080
volumes: volumes:
- name: noggin-config-volume - name: noggin-config-volume

View file

@ -7,8 +7,10 @@ def from_file(path):
return open(path, 'r').read().strip() return open(path, 'r').read().strip()
{% if subdir %}
# Deployed to a subpath # Deployed to a subpath
APPLICATION_ROOT = '/accounts/' APPLICATION_ROOT = '{{ subdir }}/'
{% endif %}
# IPA settings # IPA settings
FREEIPA_SERVERS = ['{{ ipa_server }}'] FREEIPA_SERVERS = ['{{ ipa_server }}']