mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-12-05 03:52:15 +08:00
feature:add nginx
This commit is contained in:
parent
0c58e21d77
commit
19915e8c21
1
config/conf.d/Readme.md
Normal file
1
config/conf.d/Readme.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
# nginx conf files
|
||||||
@ -1,28 +1,3 @@
|
|||||||
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 {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
|||||||
25
deployments/templates/upstream.conf
Normal file
25
deployments/templates/upstream.conf
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
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};
|
||||||
|
}
|
||||||
@ -20,7 +20,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./logs:/var/log/nginx
|
- ./logs:/var/log/nginx
|
||||||
- ./config/nginx.conf:/etc/nginx/nginx.conf
|
- ./config/nginx.conf:/etc/nginx/nginx.conf
|
||||||
- ./config/default.conf:/etc/nginx/conf.d/default.conf
|
- ./config/conf.d:/etc/nginx/conf.d
|
||||||
environment:
|
environment:
|
||||||
- NGINX_PORT=80
|
- NGINX_PORT=80
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
|
|||||||
@ -34,7 +34,7 @@ declare -A TEMPLATES=(
|
|||||||
["${OPENIM_ROOT}/deployments/templates/openim.yaml"]="${OPENIM_ROOT}/config/config.yaml"
|
["${OPENIM_ROOT}/deployments/templates/openim.yaml"]="${OPENIM_ROOT}/config/config.yaml"
|
||||||
["${OPENIM_ROOT}/deployments/templates/prometheus.yml"]="${OPENIM_ROOT}/config/prometheus.yml"
|
["${OPENIM_ROOT}/deployments/templates/prometheus.yml"]="${OPENIM_ROOT}/config/prometheus.yml"
|
||||||
["${OPENIM_ROOT}/deployments/templates/alertmanager.yml"]="${OPENIM_ROOT}/config/alertmanager.yml"
|
["${OPENIM_ROOT}/deployments/templates/alertmanager.yml"]="${OPENIM_ROOT}/config/alertmanager.yml"
|
||||||
["${OPENIM_ROOT}/deployments/templates/default.conf"]="${OPENIM_ROOT}/config/default.conf"
|
["${OPENIM_ROOT}/deployments/templates/upstream.conf"]="${OPENIM_ROOT}/config/conf.d/upstream.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Templates for example files
|
# Templates for example files
|
||||||
@ -51,6 +51,7 @@ declare -A COPY_TEMPLATES=(
|
|||||||
["${OPENIM_ROOT}/deployments/templates/instance-down-rules.yml"]="${OPENIM_ROOT}/config/instance-down-rules.yml"
|
["${OPENIM_ROOT}/deployments/templates/instance-down-rules.yml"]="${OPENIM_ROOT}/config/instance-down-rules.yml"
|
||||||
["${OPENIM_ROOT}/deployments/templates/notification.yaml"]="${OPENIM_ROOT}/config/notification.yaml"
|
["${OPENIM_ROOT}/deployments/templates/notification.yaml"]="${OPENIM_ROOT}/config/notification.yaml"
|
||||||
["${OPENIM_ROOT}/deployments/templates/nginx.conf"]="${OPENIM_ROOT}/config/nginx.conf"
|
["${OPENIM_ROOT}/deployments/templates/nginx.conf"]="${OPENIM_ROOT}/config/nginx.conf"
|
||||||
|
["${OPENIM_ROOT}/deployments/templates/default.conf"]="${OPENIM_ROOT}/config/conf.d/default.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
# Templates for config Copy file
|
# Templates for config Copy file
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user