chore(service): improve mosquitto template (#6227)

This commit is contained in:
Diogo Carvalho 2026-01-05 17:25:15 +00:00 committed by GitHub
parent 59e6da4ae3
commit c406afddaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -15,14 +15,15 @@ services:
- REQUIRE_CERTIFICATE=${REQUIRE_CERTIFICATE:-false} - REQUIRE_CERTIFICATE=${REQUIRE_CERTIFICATE:-false}
- ALLOW_ANONYMOUS=${ALLOW_ANONYMOUS:-true} - ALLOW_ANONYMOUS=${ALLOW_ANONYMOUS:-true}
volumes: volumes:
- mosquitto-config:/mosquitto/config - "./mosquitto/config:/mosquitto/config"
- mosquitto-certs:/certs - "./certs:/certs"
ports:
- "8883:8883"
healthcheck: healthcheck:
test: ["CMD-SHELL", "exit 0"] test: ["CMD-SHELL", "exit 0"]
interval: 30s interval: 30s
timeout: 10s timeout: 10s
retries: 3 retries: 3
entrypoint: 'sh -c " entrypoint: 'sh -c "
if [ ''$REQUIRE_CERTIFICATE'' = ''true'' ]; then if [ ''$REQUIRE_CERTIFICATE'' = ''true'' ]; then
echo ''listener 8883'' > /mosquitto/config/mosquitto.conf && echo ''listener 8883'' > /mosquitto/config/mosquitto.conf &&