Add nginx load balancer
parent
919bedaa20
commit
dc41f7ccc7
|
@ -16,6 +16,18 @@ services:
|
|||
openfire-clustered-net:
|
||||
ipv4_address: 172.60.0.11
|
||||
|
||||
lb:
|
||||
image: nginx:stable
|
||||
ports:
|
||||
- "55222:55222"
|
||||
- "57070:57070"
|
||||
- "57443:57443"
|
||||
volumes:
|
||||
- ./nginx/clustered/nginx.conf:/etc/nginx/nginx.conf
|
||||
networks:
|
||||
openfire-clustered-net:
|
||||
ipv4_address: 172.60.0.99
|
||||
|
||||
xmpp1:
|
||||
image: openfire:latest
|
||||
ports:
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# error_log stdout debug;
|
||||
|
||||
stream {
|
||||
upstream xmpp {
|
||||
server 172.60.0.10:5222;
|
||||
server 172.60.0.20:5222;
|
||||
}
|
||||
server {
|
||||
listen 55222;
|
||||
tcp_nodelay on;
|
||||
proxy_connect_timeout 10s;
|
||||
proxy_timeout 30s;
|
||||
proxy_pass xmpp;
|
||||
}
|
||||
|
||||
#upstream bosh {
|
||||
# server xmpp1:7071;
|
||||
# server xmpp2:7072;
|
||||
#}
|
||||
#server {
|
||||
# listen 57070;
|
||||
# proxy_connect_timeout 10s;
|
||||
# proxy_timeout 30s;
|
||||
# proxy_pass bosh;
|
||||
#}
|
||||
}
|
||||
|
||||
events {}
|
Loading…
Reference in New Issue