Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistence with Mosquitto #76

Open
Narsskrarc opened this issue Mar 2, 2022 · 0 comments
Open

Persistence with Mosquitto #76

Narsskrarc opened this issue Mar 2, 2022 · 0 comments

Comments

@Narsskrarc
Copy link

It seems to be quite simple to add persistence to mosquitto. Simply add
persistence true
persistence_location /mosquitto/data
to data/mqtt/config/mosquitto.conf.

But - that doesn't work.
The reason is, that /mosquitto/data isn't mounted to data/mqtt/data, as one could expect.
You have to add

mqtt:
    volumes:
      - ./data/mqtt/data:/mosquitto/data

explicitly to the docker-compose.yml. Only then the persistence is really persistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant