auto commit
This commit is contained in:
parent
0a87b2308f
commit
27d22e2212
@ -92,17 +92,21 @@ services:
|
||||
retries: 3
|
||||
|
||||
fems-mqtt:
|
||||
image: eclipse-mosquitto:latest
|
||||
build:
|
||||
context: ./fems-mqtt
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
- MQTT_USERNAME=${MQTT_USERNAME}
|
||||
- MQTT_PASSWORD=${MQTT_PASSWORD}
|
||||
container_name: fems-mqtt
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${MQTT_PORT}:1883" # MQTT
|
||||
- "${MQTT_WSS_PORT}:8883" # WebSocket
|
||||
- "${MQTT_PORT}:1883"
|
||||
- "${MQTT_WSS_PORT}:8883"
|
||||
volumes:
|
||||
- ./fems-mqtt/config:/mosquitto/config:ro
|
||||
- ./fems-mqtt/data:/mosquitto/data
|
||||
- ./fems-mqtt/log:/mosquitto/log
|
||||
- ./fems-mqtt/certs:/mosquitto/certs:ro
|
||||
- ./fems-mqtt/certs:/mosquitto/certs
|
||||
environment:
|
||||
- TZ=Asia/Seoul
|
||||
- MQTT_USERNAME=${MQTT_USERNAME}
|
||||
|
20
fems-mqtt/Dockerfile
Normal file
20
fems-mqtt/Dockerfile
Normal file
@ -0,0 +1,20 @@
|
||||
# fems-mqtt/Dockerfile
|
||||
FROM eclipse-mosquitto:latest
|
||||
|
||||
# 환경 변수 설정
|
||||
ARG MQTT_USERNAME
|
||||
ARG MQTT_PASSWORD
|
||||
|
||||
# 설정 파일 복사
|
||||
COPY ./config/mosquitto.conf /mosquitto/config/mosquitto.conf
|
||||
|
||||
# 권한 설정 및 비밀번호 파일 생성
|
||||
RUN touch /mosquitto/config/passwd && \
|
||||
mosquitto_passwd -b /mosquitto/config/passwd ${MQTT_USERNAME:-fems} ${MQTT_PASSWORD:-fems123!} && \
|
||||
chmod -R 755 /mosquitto/config && \
|
||||
chmod -R 777 /mosquitto/log && \
|
||||
chmod 600 /mosquitto/config/passwd
|
||||
|
||||
EXPOSE 1883 8883
|
||||
|
||||
CMD ["/usr/sbin/mosquitto", "-c", "/mosquitto/config/mosquitto.conf"]
|
@ -1726,3 +1726,59 @@ To fix this, use `chmod 0700 /mosquitto/config/passwd`.
|
||||
1732087507: Client auto-A1AFCD04-8E34-6264-F1F4-02B742A2B49D disconnected, not authorised.
|
||||
1732087529: mosquitto version 2.0.20 terminating
|
||||
1732087529: Saving in-memory database to /mosquitto/data//mosquitto.db.
|
||||
1732087977: mosquitto version 2.0.20 starting
|
||||
1732087977: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087977: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087977: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087978: mosquitto version 2.0.20 starting
|
||||
1732087978: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087978: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087978: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087978: mosquitto version 2.0.20 starting
|
||||
1732087978: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087978: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087978: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087979: mosquitto version 2.0.20 starting
|
||||
1732087979: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087979: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087979: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087980: mosquitto version 2.0.20 starting
|
||||
1732087980: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087980: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087980: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087982: mosquitto version 2.0.20 starting
|
||||
1732087982: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087982: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087982: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087985: mosquitto version 2.0.20 starting
|
||||
1732087985: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087985: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087985: Error opening password file "/mosquitto/config/passwd".
|
||||
1732087992: mosquitto version 2.0.20 starting
|
||||
1732087992: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732087992: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732087992: Error opening password file "/mosquitto/config/passwd".
|
||||
1732088005: mosquitto version 2.0.20 starting
|
||||
1732088005: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732088005: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732088005: Error opening password file "/mosquitto/config/passwd".
|
||||
1732088031: mosquitto version 2.0.20 starting
|
||||
1732088031: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732088031: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732088031: Error opening password file "/mosquitto/config/passwd".
|
||||
1732088083: mosquitto version 2.0.20 starting
|
||||
1732088083: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732088083: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732088083: Error opening password file "/mosquitto/config/passwd".
|
||||
1732088144: mosquitto version 2.0.20 starting
|
||||
1732088144: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732088144: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732088144: Error opening password file "/mosquitto/config/passwd".
|
||||
1732088205: mosquitto version 2.0.20 starting
|
||||
1732088205: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732088205: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732088205: Error opening password file "/mosquitto/config/passwd".
|
||||
1732088265: mosquitto version 2.0.20 starting
|
||||
1732088265: Config loaded from /mosquitto/config/mosquitto.conf.
|
||||
1732088265: Error: Unable to open pwfile "/mosquitto/config/passwd".
|
||||
1732088265: Error opening password file "/mosquitto/config/passwd".
|
||||
|
Loading…
Reference in New Issue
Block a user