Local MQTT server (mosquitto)
> docker compose run -it --rm mqtt sh
$ mosquitto_passwd -c /mosquitto/config/pwfile user
Password: foobar
Reenter password: foobar
$ exit
SUBSCRIBER_MQTT_HOSTNAME="127.0.0.1"
SUBSCRIBER_MQTT_PORT="1883"
SUBSCRIBER_MQTT_USERNAME="user"
SUBSCRIBER_MQTT_PASSWORD="foobar"
SUBSCRIBER_MQTT_USE_TLS="false"
To use a custom .env
file, set SUBSCRIBER_ENV_FILE
to the desired path.
alembic upgrade head
alembic revision --autogenerate -m "What was changed?"
python -m consumer
for SAMPLE_FILE in scripts/samples-*.txt
do
python -m scripts.publish-samples $SAMPLE_FILE
done
python -m consumer prune
pytest
pytest --accept
©️ 2025 Bartosz Sławecki