mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 15:02:07 -03:30
Make static asset location consistent across all deployments (#12819)
This commit is contained in:
parent
1afa49f3ff
commit
260e1d4f2d
@ -108,10 +108,6 @@ AWX_DISABLE_TASK_MANAGERS = False
|
||||
if 'sqlite3' not in DATABASES['default']['ENGINE']: # noqa
|
||||
DATABASES['default'].setdefault('OPTIONS', dict()).setdefault('application_name', f'{CLUSTER_HOST_ID}-{os.getpid()}-{" ".join(sys.argv)}'[:63]) # noqa
|
||||
|
||||
# Everywhere else we use /var/lib/awx/public/static/ - but this requires running collectstatic.
|
||||
# This makes the browsable API work in the dev env without any additional steps.
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, 'public', 'static')
|
||||
|
||||
# If any local_*.py files are present in awx/settings/, use them to override
|
||||
# default settings for development. If not present, we can still run using
|
||||
# only the defaults.
|
||||
|
||||
@ -25,10 +25,7 @@ server {
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
|
||||
location /static/ {
|
||||
root /awx_devel;
|
||||
try_files /awx/ui/$uri /awx/$uri /awx/public/$uri =404;
|
||||
access_log off;
|
||||
sendfile off;
|
||||
alias /var/lib/awx/public/static/;
|
||||
}
|
||||
|
||||
location /favicon.ico { alias /awx_devel/awx/public/static/favicon.ico; }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user