diff --git a/.env b/.env index 50abb58..0e19ef7 100644 --- a/.env +++ b/.env @@ -1,4 +1,3 @@ -BROKER_TAG=latest SDR_SCANNER_TAG=latest MONITOR_TAG=latest TZ=Europe/London diff --git a/docker-compose.yml b/docker-compose.yml index e0ef368..af075f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,11 +1,24 @@ services: broker: - image: shajen/broker:${BROKER_TAG:-latest} + image: eclipse-mosquitto:latest env_file: .env restart: on-failure ports: - ${MQTT_PORT_TCP:-1883}:${MQTT_PORT_TCP:-1883} - ${MQTT_PORT_WS:-9001}:${MQTT_PORT_WS:-9001} + command: + - /bin/sh + - -c + - | + echo "listener ${MQTT_PORT_TCP:-1883}" > /mosquitto/config/mosquitto.conf + echo "protocol mqtt" >> /mosquitto/config/mosquitto.conf + echo "listener ${MQTT_PORT_WS:-9001}" >> /mosquitto/config/mosquitto.conf + echo "protocol websockets" >> /mosquitto/config/mosquitto.conf + echo "allow_anonymous false" >> /mosquitto/config/mosquitto.conf + echo "password_file /mosquitto/config/password.txt" >> /mosquitto/config/mosquitto.conf + echo "${MQTT_USER:-admin}:${MQTT_PASSWORD:-password}" > /mosquitto/config/password.txt + mosquitto_passwd -U /mosquitto/config/password.txt + mosquitto -c /mosquitto/config/mosquitto.conf sdr-scanner: image: shajen/sdr-scanner:${SDR_SCANNER_TAG:-latest} env_file: .env