mirror of
https://github.com/ansible/awx-operator.git
synced 2026-05-08 06:12:54 +00:00
Merge pull request #652 from shanemcd/url-prefix-support
Support running AWX at non-root path
This commit is contained in:
@@ -25,6 +25,7 @@ data:
|
|||||||
|
|
||||||
ADMINS = ()
|
ADMINS = ()
|
||||||
STATIC_ROOT = '/var/lib/awx/public/static'
|
STATIC_ROOT = '/var/lib/awx/public/static'
|
||||||
|
STATIC_URL = '{{ (ingress_path + '/static/').replace('//', '/') }}'
|
||||||
PROJECTS_ROOT = '/var/lib/awx/projects'
|
PROJECTS_ROOT = '/var/lib/awx/projects'
|
||||||
JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
|
JOBOUTPUT_ROOT = '/var/lib/awx/job_status'
|
||||||
|
|
||||||
@@ -172,15 +173,15 @@ data:
|
|||||||
deny all;
|
deny all;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /static/ {
|
location {{ (ingress_path + '/static').replace('//', '/') }} {
|
||||||
alias /var/lib/awx/public/static/;
|
alias /var/lib/awx/public/static/;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /favicon.ico {
|
location {{ (ingress_path + '/favicon.ico').replace('//', '/') }} {
|
||||||
alias /var/lib/awx/public/static/media/favicon.ico;
|
alias /var/lib/awx/public/static/media/favicon.ico;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /websocket {
|
location {{ (ingress_path + '/websocket').replace('//', '/') }} {
|
||||||
# Pass request to the upstream alias
|
# Pass request to the upstream alias
|
||||||
proxy_pass http://daphne;
|
proxy_pass http://daphne;
|
||||||
# Require http version 1.1 to allow for upgrade requests
|
# Require http version 1.1 to allow for upgrade requests
|
||||||
@@ -202,7 +203,7 @@ data:
|
|||||||
proxy_set_header Connection $connection_upgrade;
|
proxy_set_header Connection $connection_upgrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location {{ ingress_path }} {
|
||||||
# Add trailing / if missing
|
# Add trailing / if missing
|
||||||
rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;
|
rewrite ^(.*)$http_host(.*[^/])$ $1$http_host$2/ permanent;
|
||||||
uwsgi_read_timeout 120s;
|
uwsgi_read_timeout 120s;
|
||||||
|
|||||||
@@ -183,6 +183,8 @@ spec:
|
|||||||
valueFrom:
|
valueFrom:
|
||||||
fieldRef:
|
fieldRef:
|
||||||
fieldPath: metadata.namespace
|
fieldPath: metadata.namespace
|
||||||
|
- name: UWSGI_MOUNT_PATH
|
||||||
|
value: "{{ ingress_path }}"
|
||||||
{% if development_mode | bool %}
|
{% if development_mode | bool %}
|
||||||
- name: AWX_KUBE_DEVEL
|
- name: AWX_KUBE_DEVEL
|
||||||
value: "1"
|
value: "1"
|
||||||
|
|||||||
Reference in New Issue
Block a user