-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add docker-compose example in separate folder
- Loading branch information
Showing
3 changed files
with
92 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
version: "3.6" | ||
|
||
networks: | ||
bumper: | ||
internal: true | ||
|
||
services: | ||
nginx: | ||
depends_on: | ||
- bumper | ||
image: nginx:alpine | ||
networks: | ||
default: | ||
bumper: | ||
ports: | ||
- 443:443 | ||
- 5223:5223 | ||
- 8007:8007 | ||
- 8883:8883 | ||
restart: unless-stopped | ||
volumes: | ||
- /etc/timezone:/etc/timezone:ro | ||
- /etc/localtime:/etc/localtime:ro | ||
- ./nginx/:/etc/nginx:ro # See config file below | ||
|
||
bumper: | ||
image: bmartin5692/bumper | ||
restart: unless-stopped | ||
networks: | ||
bumper: | ||
|
||
environment: | ||
PUID: 1000 | ||
PGID: 1000 | ||
TZ: Europe/Rome | ||
BUMPER_ANNOUNCE_IP: XXX # Insert your IP | ||
BUMPER_LISTEN: 0.0.0.0 | ||
# BUMPER_DEBUG: "true" | ||
LOG_TO_STDOUT: "true" | ||
volumes: | ||
- /etc/timezone:/etc/timezone:ro | ||
- /etc/localtime:/etc/localtime:ro | ||
- ./config:/bumper/data | ||
- ./certs:/bumper/certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} | ||
} |