Skip to content

Commit

Permalink
does not include username and password info in files now
Browse files Browse the repository at this point in the history
  • Loading branch information
Arizbeth Rojas committed May 9, 2023
1 parent 1893fe6 commit 79ce36a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docker/Dockerfile.mqtt
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@ COPY mosquitto.conf /etc/mosquitto/nmosquitto.conf
#COPY certbot_renew.sh /certbot_renew.sh
#RUN chmod +x /certbot_renew.sh
EXPOSE 8883 443
ENTRYPOINT ["/bin/sh", "$(cat /login_info_MQTT)"]
#ENTRYPOINT ["/bin/sh", "$(cat /login_info_MQTT)"]
#ENTRYPOINT ["/bin/sh"]
COPY mqtt.sh .
RUN chmod +x /mqtt.sh
ENTRYPOINT ["./mqtt.sh"]

1 change: 0 additions & 1 deletion docker/login_info_MQTT.txt

This file was deleted.

7 changes: 4 additions & 3 deletions docker/mqtt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ apk add nano
#ufw allow 80
#expose these ports in the docker file
certbot certonly --standalone --preferred-challenges http -d mqtt-skyscan
mosquitto_passwd -c /etc/mosquitto/passwd user
#mosquitto_passwd -c /etc/mosquitto/passwd user
# /b lets us pass the username and password in the command line, replacing -c
mosquitto_passwd "$(cat /run/secrets/login_info_MQTT)"
nano /etc/mosquitto/conf.d/default.conf

#ufw allow 8883
#ufw allow 8083
ufw allow 8883
ufw allow 443

nano /etc/letsencrypt/renewal/mqtt-skyscan.conf
certbot renew --dry-run

0 comments on commit 79ce36a

Please sign in to comment.