mirror of
https://github.com/ansible/awx.git
synced 2026-03-13 23:17:32 -02:30
let nginx serve static files
This commit is contained in:
2
Makefile
2
Makefile
@@ -401,7 +401,7 @@ uwsgi: collectstatic
|
|||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
. $(VENV_BASE)/tower/bin/activate; \
|
. $(VENV_BASE)/tower/bin/activate; \
|
||||||
fi; \
|
fi; \
|
||||||
uwsgi -b 32768 --socket :8050 --module=awx.wsgi:application --home=/venv/tower --chdir=/tower_devel/ --vacuum --processes=5 --harakiri=60 --static-map /static=/tower_devel/awx/ui/static --static-map /static=/tower_devel/awx/static --static-map /static=/tower_devel/awx/public/static
|
uwsgi -b 32768 --socket :8050 --module=awx.wsgi:application --home=/venv/tower --chdir=/tower_devel/ --vacuum --processes=5 --harakiri=60
|
||||||
|
|
||||||
daphne:
|
daphne:
|
||||||
@if [ "$(VENV_BASE)" ]; then \
|
@if [ "$(VENV_BASE)" ]; then \
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ server {
|
|||||||
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
||||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||||
|
|
||||||
|
location /static/ {
|
||||||
|
root /tower_devel;
|
||||||
|
try_files /awx/ui /awx/static /awx/public/static =404;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
location /websocket {
|
location /websocket {
|
||||||
# Pass request to the upstream alias
|
# Pass request to the upstream alias
|
||||||
proxy_pass http://daphne;
|
proxy_pass http://daphne;
|
||||||
@@ -45,8 +51,4 @@ server {
|
|||||||
include /etc/nginx/uwsgi_params;
|
include /etc/nginx/uwsgi_params;
|
||||||
uwsgi_pass uwsgi;
|
uwsgi_pass uwsgi;
|
||||||
}
|
}
|
||||||
|
|
||||||
location /static/ {
|
|
||||||
root /tower_devel/awx/ui/;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user