Skip to content

Commit

Permalink
Customize to use volumes for cert
Browse files Browse the repository at this point in the history
  • Loading branch information
fwikestad committed Feb 9, 2024
1 parent 509daad commit bb047e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ RUN \
EXPOSE 1883
EXPOSE 8883
COPY ./mosquitto.conf /mosquitto.conf
COPY --chown=mosquitto:mosquitto ./CA.crt /CA.crt
COPY --chown=mosquitto:mosquitto ./server.crt /server.crt
COPY --chown=mosquitto:mosquitto ./server.key /server.key

VOLUME [ "/etc/cert" ]

#COPY --chown=mosquitto:mosquitto ./CA.crt /CA.crt
#COPY --chown=mosquitto:mosquitto ./server.crt /server.crt
#COPY --chown=mosquitto:mosquitto ./server.key /server.key

CMD [ "mosquitto", "-c", "/mosquitto.conf"]
6 changes: 3 additions & 3 deletions mosquitto.conf
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ listener 1883
# TLS
listener 8883
tls_keyform pem
cafile /CA.crt
certfile /server.crt
keyfile /server.key
#cafile /CA.crt
certfile /etc/cert/mqtt.academy.nordicsemi.com/fullchain.pem
keyfile /etc/cert/mqtt.academy.nordicsemi.com/privkey.pem

0 comments on commit bb047e9

Please sign in to comment.