persistence included
This commit is contained in:
@ -1,9 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
IMAGE=registry.gitlab.com/wolutator/mosquitto-with-auth:latest
|
||||
VOLUME=mosquitto-config
|
||||
VOLUME_CONFIG=mosquitto-config
|
||||
VOLUME_DATA=mosquitto-data
|
||||
|
||||
docker volume inspect $VOLUME > /dev/null || docker volume create $VOLUME
|
||||
docker volume inspect $VOLUME_CONFIG > /dev/null || docker volume create $VOLUME_CONFIG
|
||||
docker volume inspect $VOLUME_DATA > /dev/null || docker volume create $VOLUME_DATA
|
||||
|
||||
docker pull $IMAGE
|
||||
|
||||
@ -13,7 +15,8 @@ docker run \
|
||||
-p1883:1883 \
|
||||
-p8883:8883 \
|
||||
-p9001:9001 \
|
||||
-v $VOLUME:/opt/etc/mosquitto \
|
||||
-v $VOLUME_CONFIG:/opt/etc/mosquitto \
|
||||
-v $VOLUME_DATA:/opt/data \
|
||||
--link mariadb \
|
||||
--name mosquitto \
|
||||
$IMAGE
|
||||
|
Reference in New Issue
Block a user