parent
2220645429
commit
d60e2f745f
@ -0,0 +1,105 @@
|
|||||||
|
upstream minio_s3 {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${MINIO_PORT};
|
||||||
|
}
|
||||||
|
upstream im_web_front {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_WEB_PORT};
|
||||||
|
}
|
||||||
|
upstream im_admin_front {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_ADMIN_FRONT_PORT};
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream im_msg_gateway {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_WS_PORT};
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream im_api {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${API_OPENIM_PORT};
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream im_chat_api {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_CHAT_API_PORT};
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream im_admin_api {
|
||||||
|
server ${DOCKER_BRIDGE_GATEWAY}:${OPENIM_ADMIN_API_PORT};
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
#server_name hostname;
|
||||||
|
gzip on;
|
||||||
|
gzip_min_length 1k;
|
||||||
|
gzip_buffers 4 16k;
|
||||||
|
gzip_comp_level 2;
|
||||||
|
gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png application/wasm;
|
||||||
|
gzip_vary off;
|
||||||
|
gzip_disable "MSIE [1-6]\.";
|
||||||
|
error_page 405 =200 $uri;
|
||||||
|
default_type application/wasm;
|
||||||
|
# base open
|
||||||
|
location ^~/openim-front/{ #web front
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-real-ip $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://im_web_front/;
|
||||||
|
}
|
||||||
|
location ^~/openim-admin-front/{ #admin front
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-real-ip $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://im_admin_front/;
|
||||||
|
}
|
||||||
|
location ^~/msg_gateway/ { #10001 ws msggateway
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-real-ip $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://im_msg_gateway/;
|
||||||
|
}
|
||||||
|
location ^~/api/ { #10002 api openim-api
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-real-ip $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://im_api/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ^~/chat/ { #10008 im_chat_api charserver chart
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-real-ip $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://im_chat_api/;
|
||||||
|
}
|
||||||
|
location ^~/complete_admin/ { #10009 charserver admin
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "Upgrade";
|
||||||
|
proxy_set_header X-real-ip $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
proxy_pass http://im_admin_api/;
|
||||||
|
}
|
||||||
|
location ^~/im-minio-api/ { #10009 minio admin
|
||||||
|
proxy_set_header Host $http_host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_connect_timeout 300;
|
||||||
|
# Default is HTTP/1, keepalive is only enabled in HTTP/1.1
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Connection "";
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
proxy_pass http://minio_s3/;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,30 @@
|
|||||||
|
user nginx;
|
||||||
|
worker_processes auto;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log notice;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
keepalive_timeout 65;
|
||||||
|
client_max_body_size 50m;
|
||||||
|
#gzip on;
|
||||||
|
include /etc/nginx/conf.d/*.conf;
|
||||||
|
}
|
Loading…
Reference in new issue