Skip to content

Commit

Permalink
feat: adds default configuration
Browse files Browse the repository at this point in the history
Signed-off-by: wilmardo <[email protected]>
  • Loading branch information
wilmardo committed Feb 6, 2021
1 parent 17a340f commit b2e94fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ COPY --from=builder /etc_passwd /etc/passwd
COPY --from=builder /mosquitto/src/mosquitto /mosquitto

# Add default configuration
COPY --from=builder /mosquitto/mosquitto.conf /config/mosquitto.conf
COPY mosquitto.conf /config/mosquitto.conf

USER mosquitto
ENTRYPOINT ["/mosquitto"]
Expand Down
12 changes: 3 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,15 @@ Also this container is way smaller!

## Running the container

The default credentials are (set in the mosquitto.conf):
```yaml
username: mosquitto
password: mosquitto
```
### Local Docker
The default configuration allows passwordless connections. Just do and you should be able to connect to localhost:1883:
```
docker run -d lansible/mosquitto
docker run -it -p 1883:1883 lansible/mosquitto:latest
```

### Docker-compose/Swarm

The repository contains a basic Docker Compose file which works with Swarm.
Use this or use it as a good start!
Use this or use it as a good start and example how to use a password file.

```yaml
cd examples/docker-compose
Expand Down

0 comments on commit b2e94fd

Please sign in to comment.