badges: add wsgi for web frontend
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
This commit is contained in:
parent
b7644425db
commit
39ebdac18d
3 changed files with 27 additions and 3 deletions
|
@ -30,11 +30,14 @@ spec:
|
||||||
containers:
|
containers:
|
||||||
- name: frontend
|
- name: frontend
|
||||||
image: tahrir:latest
|
image: tahrir:latest
|
||||||
command: ["poetry"]
|
|
||||||
args: ["run", "gunicorn", "--paste", "/etc/badges/tahrir.ini", "-b", "0.0.0.0:8080", "-w", "4", "--log-level", "DEBUG", "-k", "gthread", "--threads", "2", "--preload", "--log-file=-"]
|
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
env:
|
||||||
|
- name: GUNICORN_CMD_ARGS
|
||||||
|
value: "--bind=0.0.0.0:8080"
|
||||||
|
- name: APP_MODULE
|
||||||
|
value: "deploy.wsgi"
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- name: etc-badges
|
- name: etc-badges
|
||||||
mountPath: "/etc/badges"
|
mountPath: "/etc/badges"
|
||||||
|
@ -42,6 +45,9 @@ spec:
|
||||||
- name: rules
|
- name: rules
|
||||||
mountPath: "/var/lib/badges"
|
mountPath: "/var/lib/badges"
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
- name: wsgi-script-volume
|
||||||
|
mountPath: "/opt/app-root/src/deploy"
|
||||||
|
readOnly: true
|
||||||
- name: ipa-config-volume
|
- name: ipa-config-volume
|
||||||
mountPath: /etc/ipa
|
mountPath: /etc/ipa
|
||||||
readOnly: true
|
readOnly: true
|
||||||
|
@ -95,6 +101,9 @@ spec:
|
||||||
- name: rules
|
- name: rules
|
||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: rules
|
claimName: rules
|
||||||
|
- name: wsgi-script-volume
|
||||||
|
configMap:
|
||||||
|
name: wsgi-script
|
||||||
- name: ipa-config-volume
|
- name: ipa-config-volume
|
||||||
configMap:
|
configMap:
|
||||||
name: ipa-client-config
|
name: ipa-client-config
|
||||||
|
|
|
@ -19,3 +19,13 @@ items:
|
||||||
{{ load_file('checkout-rules-repo.sh') | indent(6) }}
|
{{ load_file('checkout-rules-repo.sh') | indent(6) }}
|
||||||
tahrir.ini: |-
|
tahrir.ini: |-
|
||||||
{{ load_file('tahrir.ini') | indent(6) }}
|
{{ load_file('tahrir.ini') | indent(6) }}
|
||||||
|
- apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: wsgi-script
|
||||||
|
labels:
|
||||||
|
app: tahrir
|
||||||
|
data:
|
||||||
|
wsgi.py: |-
|
||||||
|
{{ load_file('wsgi.py') | indent(6) }}
|
||||||
|
__init__.py: ""
|
5
roles/openshift-apps/badges/templates/wsgi.py
Normal file
5
roles/openshift-apps/badges/templates/wsgi.py
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
from pyramid.paster import get_app, setup_logging
|
||||||
|
ini_path = '/etc/badges/tahrir.ini'
|
||||||
|
setup_logging(ini_path)
|
||||||
|
|
||||||
|
application = get_app(ini_path, 'main')
|
Loading…
Add table
Add a link
Reference in a new issue