Test compose
This folder contains a simple Docker Compose stack to run the Go server together with a MySQL database, an MQTT broker, and a Python subscriber client.
Quickstart:
cd test
docker compose up --build
- The Go server is built from the repository
Dockerfileand is configured via environment variables indocker-compose.yml. - The MySQL database is initialized with the schema from
../ai-improved.sql. - The MQTT broker is
eclipse-mosquittoand is exposed on port1883. - The
subscriberservice runssubscribe.pyand prints any messages published to thelambdaiottopic.
To run the Python subscriber locally instead of in Docker:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
MQTT_BROKER=localhost:1883 MQTT_TOPIC=lambdaiot python subscribe.py