Initial commit

This commit is contained in:
Saber Karmous
2018-10-24 21:18:46 +02:00
commit d28fb1f24f
10 changed files with 702 additions and 0 deletions

25
sample/docker-compose.yml Executable file
View File

@@ -0,0 +1,25 @@
version: '2'
services:
mqtt:
image: bitrox/mqtt
networks:
- backend-net
ports:
- 1883:1883
- 8083:8083
- 8883:8883
- 8116:80
environment:
- DOMAIN=mqtt.bitrox.io
- EMAIL=proxy@bitrox.io
volumes:
- ./mosquitto/conf/:/mosquitto/conf
- ./mosquitto/log/:/mosquitto/log
- ./letsencrypt:/etc/letsencrypt
- ./scripts:/scripts
container_name: mqtt
restart: always
networks:
backend-net:
external:
name: backend-net

64
sample/mosquitto.conf Executable file
View File

@@ -0,0 +1,64 @@
# Config file for mosquitto
#
# See mosquitto.conf(5) for more information.
#
# =================================================================
# General configuration
# =================================================================
# When run as root, drop privileges to this user and its primary
# group.
# Leave blank to stay as root, but this is not recommended.
# If run as a non-root user, this setting has no effect.
# Note that on Windows this has no effect and so mosquitto should
# be started by the user you wish it to run as.
user mosquitto
# =================================================================
# Default listener
# =================================================================
port 1883
protocol mqtt
# =================================================================
# Extra listeners
# =================================================================
listener 8083
protocol websockets
cafile /etc/letsencrypt/live/mqtt.bitrox.io/chain.pem
certfile /etc/letsencrypt/live/mqtt.bitrox.io/fullchain.pem
keyfile /etc/letsencrypt/live/mqtt.bitrox.io/privkey.pem
listener 8883
protocol mqtt
cafile /etc/letsencrypt/live/mqtt.bitrox.io/chain.pem
certfile /etc/letsencrypt/live/mqtt.bitrox.io/fullchain.pem
keyfile /etc/letsencrypt/live/mqtt.bitrox.io/privkey.pem
# =================================================================
# Logging
# =================================================================
log_dest file /mosquitto/log/mosquitto.log
log_type all
websockets_log_level 255
connection_messages true
log_timestamp true
# =================================================================
# Security
# =================================================================
allow_anonymous false
# -----------------------------------------------------------------
# Default authentication and topic access control
# -----------------------------------------------------------------
# Control access to the broker using a password file. This file can be
# generated using the mosquitto_passwd utility.
password_file /mosquitto/conf/passwd