Compare commits
12 Commits
Author | SHA1 | Date |
---|---|---|
Paolo Asperti | f632156a4c | |
Paolo Asperti | 7454aa6699 | |
Paolo Asperti | 003b2360b2 | |
Paolo Asperti | 7eebac8e3c | |
Paolo Asperti | d8f7d9dc85 | |
Paolo Asperti | 4a5a806860 | |
Paolo Asperti | 9e19382e0f | |
Paolo Asperti | 95942e9948 | |
Paolo Asperti | 1ee1efc57d | |
Paolo Asperti | 6da604ce44 | |
Paolo Asperti | 05058884ee | |
Paolo Asperti | adea6be4f7 |
26
.drone.yml
26
.drone.yml
|
@ -1,35 +1,21 @@
|
|||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: build
|
||||
image: plugins/docker:linux-amd64
|
||||
pull: always
|
||||
settings:
|
||||
daemon_off: false
|
||||
dry_run: true
|
||||
repo: docker.asperti.com/paspo/mqtt
|
||||
tags:
|
||||
- latest
|
||||
when:
|
||||
event:
|
||||
exclude:
|
||||
- tag
|
||||
|
||||
- name: build_and_publish
|
||||
image: plugins/docker:linux-amd64
|
||||
pull: always
|
||||
settings:
|
||||
auto_tag: true
|
||||
daemon_off: false
|
||||
password:
|
||||
from_secret: docker_password
|
||||
registry: docker.asperti.com
|
||||
repo: docker.asperti.com/paspo/mqtt
|
||||
tags:
|
||||
- latest
|
||||
force_tag: true
|
||||
username:
|
||||
from_secret: docker_username
|
||||
when:
|
||||
event:
|
||||
- tag
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- tag
|
||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -1,4 +1,8 @@
|
|||
FROM alpine:3.10
|
||||
RUN apk -U upgrade && apk add mosquitto mosquitto-clients openssl
|
||||
EXPOSE 8883
|
||||
FROM alpine:3.15
|
||||
RUN \
|
||||
apk -U upgrade && apk add mosquitto mosquitto-clients openssl && \
|
||||
echo "log_dest stdout" >/etc/mosquitto/mosquitto.conf && \
|
||||
echo "listener 1883" >>/etc/mosquitto/mosquitto.conf && \
|
||||
echo "allow_anonymous true" >>/etc/mosquitto/mosquitto.conf
|
||||
|
||||
ENTRYPOINT ["mosquitto", "-c", "/etc/mosquitto/mosquitto.conf"]
|
||||
|
|
|
@ -30,6 +30,7 @@ services:
|
|||
```
|
||||
|
||||
This is the configuration (mosquitto.conf):
|
||||
|
||||
```
|
||||
listener 8883
|
||||
certfile /data/live/domain/cert.pem
|
||||
|
@ -47,7 +48,14 @@ psk_file /etc/mosquitto/pskfile
|
|||
The first port is used with a passwd file, that you can create in the usual way.
|
||||
|
||||
You also need to create a file named "pskfile" to access the "secondary" port, with this syntax:
|
||||
|
||||
```
|
||||
user1:password1
|
||||
user2:password2
|
||||
```
|
||||
|
||||
## password update
|
||||
|
||||
```sh
|
||||
docker compose exec server mosquitto_passwd -b /etc/mosquitto/passwd username StrongPa$$w0rd
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue