#!/bin/bash

REPO=eclipse-mosquitto

docker pull $REPO

docker container stop mosquitto
docker container rm mosquitto

docker run -it --name mosquitto \
    --restart unless-stopped \
    -p 8883:8883 \
    --network docker-private \
    -e DEBUG=1 \
    -l traefik.enable=false \
    -v /var/mosquitto/config:/mosquitto/config \
    -v /var/mosquitto/data:/mosquitto/data \
    -v /var/mosquitto/log:/mosquitto/log \
    ${REPO}:latest
