test: create mosquitto passwordfile with -c to ensure proper creation
This commit is contained in:
@@ -34,7 +34,7 @@ services:
|
||||
- MOSQ_USER=testuser
|
||||
- MOSQ_PASS=testpass
|
||||
# ensure a password file exists (in the writable data volume) and start mosquitto with our config
|
||||
command: sh -c "mkdir -p /mosquitto/data; mosquitto_passwd -b /mosquitto/data/passwordfile ${MOSQ_USER} ${MOSQ_PASS} >/dev/null 2>&1 || true; chown -R mosquitto:mosquitto /mosquitto/data || true; /usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf"
|
||||
command: sh -c "mkdir -p /mosquitto/data; mosquitto_passwd -c -b /mosquitto/data/passwordfile ${MOSQ_USER} ${MOSQ_PASS} >/dev/null 2>&1 || true; chown -R mosquitto:mosquitto /mosquitto/data || true; /usr/sbin/mosquitto -c /mosquitto/config/mosquitto.conf"
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-c", "nc -z localhost 1883 || exit 1"]
|
||||
interval: 2s
|
||||
|
||||
Reference in New Issue
Block a user