parent
be73d2810f
commit
087333808e
@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
monapi:
|
||||||
|
http: 0.0.0.0:5800
|
||||||
|
addresses:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
|
transfer:
|
||||||
|
http: 0.0.0.0:5810
|
||||||
|
rpc: 0.0.0.0:5811
|
||||||
|
addresses:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
|
tsdb:
|
||||||
|
http: 0.0.0.0:5820
|
||||||
|
rpc: 0.0.0.0:5821
|
||||||
|
addresses:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
|
index:
|
||||||
|
http: 0.0.0.0:5830
|
||||||
|
rpc: 0.0.0.0:5831
|
||||||
|
addresses:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
|
judge:
|
||||||
|
http: 0.0.0.0:5840
|
||||||
|
rpc: 0.0.0.0:5841
|
||||||
|
addresses:
|
||||||
|
- 127.0.0.1
|
||||||
|
|
||||||
|
collector:
|
||||||
|
http: 0.0.0.0:2058
|
||||||
|
|
||||||
|
|
@ -0,0 +1,52 @@
|
|||||||
|
---
|
||||||
|
salt: "PLACE_SALT"
|
||||||
|
|
||||||
|
logger:
|
||||||
|
dir: "logs/monapi"
|
||||||
|
level: "WARNING"
|
||||||
|
keepHours: 24
|
||||||
|
|
||||||
|
http:
|
||||||
|
secret: "PLACE_SECRET"
|
||||||
|
|
||||||
|
# for ldap authorization
|
||||||
|
ldap:
|
||||||
|
host: "ldap.example.org"
|
||||||
|
port: 389
|
||||||
|
baseDn: "dc=example,dc=org"
|
||||||
|
bindUser: "cn=manager,dc=example,dc=org"
|
||||||
|
bindPass: "*******"
|
||||||
|
# openldap: (&(uid=%s))
|
||||||
|
# AD: (&(sAMAccountName=%s))
|
||||||
|
authFilter: "(&(uid=%s))"
|
||||||
|
tls: false
|
||||||
|
startTLS: false
|
||||||
|
|
||||||
|
# notify support: voice, sms, mail, im
|
||||||
|
# if we have all of notice channel
|
||||||
|
# notify:
|
||||||
|
# p1: ["voice", "sms", "mail", "im"]
|
||||||
|
# p2: ["sms", "mail", "im"]
|
||||||
|
# p3: ["mail", "im"]
|
||||||
|
|
||||||
|
# if we only have mail channel
|
||||||
|
notify:
|
||||||
|
p1: ["mail"]
|
||||||
|
p2: ["mail"]
|
||||||
|
p3: ["mail"]
|
||||||
|
|
||||||
|
# addresses accessible using browsers
|
||||||
|
link:
|
||||||
|
stra: http://n9e.example.com/#/monitor/strategy/%v
|
||||||
|
event: http://n9e.example.com/#/monitor/history/his/%v
|
||||||
|
claim: http://n9e.example.com/#/monitor/history/cur/%v
|
||||||
|
|
||||||
|
# for alarm event and message queue
|
||||||
|
redis:
|
||||||
|
addr: "redis:6379"
|
||||||
|
pass: ""
|
||||||
|
# in ms
|
||||||
|
# timeout:
|
||||||
|
# conn: 500
|
||||||
|
# read: 3000
|
||||||
|
# write: 3000
|
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
uic:
|
||||||
|
addr: "root:1234@tcp(mysql:3306)/n9e_uic?charset=utf8&parseTime=True&loc=Asia%2FShanghai"
|
||||||
|
max: 16
|
||||||
|
idle: 4
|
||||||
|
debug: false
|
||||||
|
mon:
|
||||||
|
addr: "root:1234@tcp(mysql:3306)/n9e_mon?charset=utf8&parseTime=True&loc=Asia%2FShanghai"
|
||||||
|
max: 16
|
||||||
|
idle: 4
|
||||||
|
debug: false
|
||||||
|
hbs:
|
||||||
|
addr: "root:1234@tcp(mysql:3306)/n9e_hbs?charset=utf8&parseTime=True&loc=Asia%2FShanghai"
|
||||||
|
max: 16
|
||||||
|
idle: 4
|
||||||
|
debug: false
|
@ -0,0 +1,89 @@
|
|||||||
|
user root;
|
||||||
|
|
||||||
|
worker_processes auto;
|
||||||
|
worker_cpu_affinity auto;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
pid /run/nginx.pid;
|
||||||
|
|
||||||
|
include /usr/share/nginx/modules/*.conf;
|
||||||
|
|
||||||
|
events {
|
||||||
|
use epoll;
|
||||||
|
worker_connections 204800;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||||
|
'$status $body_bytes_sent "$http_referer" '
|
||||||
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log main;
|
||||||
|
|
||||||
|
sendfile on;
|
||||||
|
tcp_nopush on;
|
||||||
|
tcp_nodelay on;
|
||||||
|
keepalive_timeout 65;
|
||||||
|
types_hash_max_size 2048;
|
||||||
|
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
|
||||||
|
|
||||||
|
proxy_connect_timeout 500ms;
|
||||||
|
proxy_send_timeout 1000ms;
|
||||||
|
proxy_read_timeout 3000ms;
|
||||||
|
proxy_buffers 64 8k;
|
||||||
|
proxy_busy_buffers_size 128k;
|
||||||
|
proxy_temp_file_write_size 64k;
|
||||||
|
proxy_redirect off;
|
||||||
|
proxy_next_upstream error invalid_header timeout http_502 http_504;
|
||||||
|
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Real-Port $remote_port;
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
||||||
|
upstream n9e.monapi {
|
||||||
|
server monapi:5800;
|
||||||
|
keepalive 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream n9e.index {
|
||||||
|
server 127.0.0.1:5830;
|
||||||
|
keepalive 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream n9e.transfer {
|
||||||
|
server 127.0.0.1:5810;
|
||||||
|
keepalive 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
server_name _;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
|
# Load configuration files for the default server block.
|
||||||
|
include /etc/nginx/default.d/*.conf;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /home/n9e/pub;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/portal {
|
||||||
|
proxy_pass http://n9e.monapi;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/index {
|
||||||
|
proxy_pass http://n9e.index;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/transfer {
|
||||||
|
proxy_pass http://n9e.transfer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
FROM node:lts-alpine AS builder
|
FROM node:lts-alpine AS builder
|
||||||
|
|
||||||
WORKDIR /home/app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
RUN npm install
|
Loading…
Reference in new issue