Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions nginx/awx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,13 @@ server {
root /usr/share/nginx/html;

location /api {
proxy_pass $AWX_PROTOCOL://$AWX_HOST;
proxy_set_header Host $AWX_HOST;
proxy_set_header Origin $AWX_PROTOCOL://$AWX_HOST;
proxy_set_header Referer $AWX_PROTOCOL://$AWX_HOST;
proxy_pass $AWX_SERVER;
proxy_set_header Origin $AWX_SERVER;
}

location /websocket {
proxy_pass $AWX_PROTOCOL://$AWX_HOST;
proxy_set_header Host $AWX_HOST;
proxy_set_header Origin $AWX_PROTOCOL://$AWX_HOST;
proxy_set_header Referer $AWX_PROTOCOL://$AWX_HOST;

proxy_pass $AWX_SERVER;
proxy_set_header Origin $AWX_SERVER;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
Expand Down
19 changes: 7 additions & 12 deletions nginx/eda.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,19 @@ server {

root /usr/share/nginx/html;

location ~ ^/api/eda/ws/[0-9a-z-]+ {
proxy_pass $EDA_PROTOCOL://$EDA_HOST;
proxy_set_header Host $EDA_HOST;
proxy_set_header Origin $EDA_PROTOCOL://$EDA_HOST;
proxy_set_header Referer $EDA_PROTOCOL://$EDA_HOST;
location ~ ^/api/eda/v[0-9]+/ {
proxy_pass $EDA_SERVER;
proxy_set_header Origin $EDA_SERVER;
}

location ~ ^/api/eda/ws/[0-9a-z-]+ {
proxy_pass $EDA_SERVER;
proxy_set_header Origin $EDA_SERVER;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}

location ~ ^/api/eda/v[0-9]+/ {
proxy_pass $EDA_PROTOCOL://$EDA_HOST;
proxy_set_header Host $EDA_HOST;
proxy_set_header Origin $EDA_PROTOCOL://$EDA_HOST;
proxy_set_header Referer $EDA_PROTOCOL://$EDA_HOST;
}

location ~* \.(json|woff|woff2|jpe?g|png|gif|ico|svg|css|js)$ {
add_header Cache-Control "public, max-age=31536000, s-maxage=31536000, immutable";
try_files $uri =404;
Expand Down
6 changes: 2 additions & 4 deletions nginx/hub.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ server {
root /usr/share/nginx/html;

location /api {
proxy_pass $HUB_PROTOCOL://$HUB_HOST;
proxy_set_header Host $HUB_HOST;
proxy_set_header Origin $HUB_PROTOCOL://$HUB_HOST;
proxy_set_header Referer $HUB_PROTOCOL://$HUB_HOST;
proxy_pass $HUB_SERVER;
proxy_set_header Origin $HUB_SERVER;
}

location ~* \.(json|woff|woff2|jpe?g|png|gif|ico|svg|css|js)$ {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
"docker:build:hub": "docker build --target hub-ui --tag hub-ui .",
"docker:build:eda": "docker build --target eda-ui --tag eda-ui .",
"docker:run": "concurrently npm:docker:run:awx npm:docker:run:hub npm:docker:run:eda -c cyan,green,blue",
"docker:run:awx": "echo http://localhost:4101 && docker run --name awx-ui --rm -e LOG_LEVEL=debug -p 4101:8080 -e AWX_HOST=$AWX_HOST -e AWX_PROTOCOL=$AWX_PROTOCOL awx-ui",
"docker:run:hub": "echo http://localhost:4102 && docker run --name hub-ui --rm -e LOG_LEVEL=debug -p 4102:8080 -e HUB_HOST=$HUB_HOST -e HUB_PROTOCOL=$HUB_PROTOCOL hub-ui",
"docker:run:eda": "echo http://localhost:4103 && docker run --name eda-ui --rm -e LOG_LEVEL=debug -p 4103:8080 -e EDA_HOST=$EDA_HOST -e EDA_PROTOCOL=$EDA_PROTOCOL eda-ui"
"docker:run:awx": "echo http://localhost:4101 && docker run --name awx-ui --rm -e LOG_LEVEL=debug -p 4101:8080 -e AWX_SERVER=$AWX_SERVER awx-ui",
"docker:run:hub": "echo http://localhost:4102 && docker run --name hub-ui --rm -e LOG_LEVEL=debug -p 4102:8080 -e HUB_SERVER=$HUB_SERVER hub-ui",
"docker:run:eda": "echo http://localhost:4103 && docker run --name eda-ui --rm -e LOG_LEVEL=debug -p 4103:8080 -e EDA_SERVER=$EDA_SERVER eda-ui"
},
"dependencies": {
"@ansible/react-json-chart-builder": "^1.15.2",
Expand Down