mirror of
https://github.com/gravitl/netmaker.git
synced 2024-11-12 04:25:08 +08:00
update compose file and scripts to use mosquitto broker. Includes insecure config file for mosquitto
This commit is contained in:
parent
6056d711a6
commit
815ce3cf24
4 changed files with 28 additions and 0 deletions
|
@ -68,9 +68,20 @@ services:
|
|||
# - $PWD/site:/srv # you could also serve a static site in site folder
|
||||
- caddy_data:/data
|
||||
- caddy_conf:/config
|
||||
mosquitto:
|
||||
image: eclipse-mosquitto:2.0.14
|
||||
container_name: broker
|
||||
restart: unless-stopped
|
||||
network_mode: host
|
||||
volumes:
|
||||
- /root/mosquitto.conf:/mosquitto/config/mosquitto.conf
|
||||
- mosquitto_data:/var/lib/mosquitto
|
||||
- mosquitto_logs:/var/log/mosquitto/mosquitto.log
|
||||
volumes:
|
||||
caddy_data: {}
|
||||
caddy_conf: {}
|
||||
sqldata: {}
|
||||
dnsconfig: {}
|
||||
mosquitto_data: {}
|
||||
mosquitto_logs: {}
|
||||
|
||||
|
|
10
docker/mosquitto.conf
Normal file
10
docker/mosquitto.conf
Normal file
|
@ -0,0 +1,10 @@
|
|||
persitance true
|
||||
persistance_location /var/lib/mosquitto/
|
||||
|
||||
log_dest_file /var/log/mosquitto/mosquitto.log
|
||||
|
||||
per_listener_settings true
|
||||
listener 1883
|
||||
allow_anonymous true
|
||||
bind_interface SERVER_PUBLIC_IP
|
||||
|
|
@ -136,6 +136,9 @@ echo "Setting Caddyfile..."
|
|||
sed -i "s/NETMAKER_BASE_DOMAIN/$NETMAKER_BASE_DOMAIN/g" /root/Caddyfile
|
||||
sed -i "s/YOUR_EMAIL/$EMAIL/g" /root/Caddyfile
|
||||
|
||||
echo "Setting Broker..."
|
||||
sed -i "s/SERVER_PBLIC_IP/$SERVER_PUBLIC_IP/g" /root/mosquitto.conf
|
||||
|
||||
echo "Setting docker-compose..."
|
||||
|
||||
sed -i "s/NETMAKER_BASE_DOMAIN/$NETMAKER_BASE_DOMAIN/g" /root/docker-compose.yml
|
||||
|
|
|
@ -135,6 +135,10 @@ wget -q -O /root/Caddyfile https://raw.githubusercontent.com/gravitl/netmaker/ma
|
|||
sed -i "s/NETMAKER_BASE_DOMAIN/$NETMAKER_BASE_DOMAIN/g" /root/Caddyfile
|
||||
sed -i "s/YOUR_EMAIL/$EMAIL/g" /root/Caddyfile
|
||||
|
||||
echo "setting mosquitto.conf..."
|
||||
|
||||
wget -q -O /root/mosquitto.conf https://raw.githubusercontent.com/gravil/netmaker/master/docker/mosquitto.conf
|
||||
sed -i "s/SERVER_PUBLIC_IP/$SERVER_PUBLIC_IP/g" /root/mosquitto.conf
|
||||
|
||||
echo "setting docker-compose..."
|
||||
|
||||
|
|
Loading…
Reference in a new issue