add docker-compose example in separate folder

This commit is contained in:
Robert Resch 2021-05-26 22:32:14 +02:00
parent c5dfad41fa
commit d61c8f5766
No known key found for this signature in database
GPG key ID: 6B360759EB2ACAEE
3 changed files with 92 additions and 129 deletions

View file

@ -0,0 +1,41 @@
error_log stderr;
pid /var/run/nginx.pid;
events { }
stream {
resolver 127.0.0.11 ipv6=off; #docker dns server
map_hash_bucket_size 64;
map $ssl_preread_server_name $internalport {
# redirect all requests, which contain "mq" in the SNI -> MQTT
~^.*(mq).*\.eco(vacs|user)\.(net|com)$ 8883;
# the rest of eco(user|vacs) requests
~^.*eco(vacs|user)\.(net|com)$ 443;
# mapping default to MQTT as the bots are connecting directly to the ip without SNI
default 8883;
}
server {
listen 443;
ssl_preread on;
proxy_pass bumper:$internalport;
}
server {
listen 5223;
proxy_pass bumper:5223;
}
server {
listen 8007;
proxy_pass bumper:8007;
}
server {
listen 8883;
proxy_pass bumper:8883;
}
}