improvements
parent
35b614b4fc
commit
d2da2e0249
|
@ -0,0 +1,4 @@
|
|||
FROM nginx:latest
|
||||
|
||||
COPY ./build /usr/share/nginx/html
|
||||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
|
|
@ -0,0 +1,9 @@
|
|||
# only allow to run this script as root
|
||||
if [ "$EUID" -ne 0 ]
|
||||
then echo "Please run as root"
|
||||
exit
|
||||
fi
|
||||
|
||||
echo "Starting static web build of admin-dashboard-web"
|
||||
npm run build
|
||||
echo "Finished static web build of admin-dashboard-web"
|
|
@ -0,0 +1,18 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
jnx-admin-dashboard-proxy:
|
||||
image: jnx-admin-dashboard-proxy:latest
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: nginx/Dockerfile
|
||||
ports:
|
||||
# CHANGE HOST/PORT IF NEEDED
|
||||
#- "127.0.0.1:80:80"
|
||||
- "80:80"
|
||||
networks:
|
||||
- jnx-admin-dashboard-network
|
||||
depends_on:
|
||||
- jnx-admin-dashboard-server
|
||||
- jnx-log-manager-server
|
|
@ -0,0 +1,33 @@
|
|||
# nginx/nginx.conf
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location /api/ { # api server
|
||||
client_max_body_size 0;
|
||||
proxy_http_version 1.0;
|
||||
proxy_pass http://jnx-admin-dashboard-server:8080/;
|
||||
}
|
||||
|
||||
location /ws { # websocket server
|
||||
proxy_read_timeout 10800s;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_pass http://jnx-admin-dashboard-server:8080/ws/;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
|
||||
location /lm/ { # log manager server
|
||||
client_max_body_size 0;
|
||||
proxy_http_version 1.0;
|
||||
proxy_set_header Connection ""; # needed for sse
|
||||
proxy_pass http://jnx-log-manager-server:3000/;
|
||||
}
|
||||
|
||||
location / { # frontend
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
import {
|
||||
CopyOutlined,
|
||||
DisconnectOutlined,
|
||||
EyeInvisibleOutlined,
|
||||
EyeOutlined,
|
||||
ReloadOutlined,
|
||||
|
|
|
@ -1425,7 +1425,7 @@ export function myFetch(
|
|||
body: getBody(),
|
||||
};
|
||||
|
||||
if (fetchUrl == "") {
|
||||
if (fetchUrl === "") {
|
||||
fetchUrl = Constants.API_ADDRESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue