Skip to content

Microservice to provide the Space API JSON from our MQTT topic status.

License

Notifications You must be signed in to change notification settings

netz39/Netz39SpaceAPI-Service

Repository files navigation

Netz39 Space API Service

Microservice to provide the Space API JSON from our MQTT topic status.

Usage

Configuration

Configuration is done using environment variables:

  • PORT: Target port when used with docker-compose (default 8080)
  • MQTT_BROKER: MQTT broker server (default mqtt)
  • MQTT_PORT: MQTT broker port (default 1883)
  • MQTT_TOPIC_STATUS: MQTT topic to listen for status messages (default status)
  • MQTT_TOPIC_LASTCHANGE: MQTT topic to listen for last change messages (default lastchange)

Run with Docker

docker run --rm -it \
    -p 8080:8080 \
    netz39/spaceapi-service

Run with Docker-Compose (Development)

To run with docker-compose copy .env.template to .env and edit the necessary variables. Then start with:

docker-compose up --build

Please note that this compose file will rebuild the image based on the repository. This is helpful during development and not intended for production use.

When done, please don't forget to remove the deployment with

docker-compose down

Maintainers

License

MIT © 2024 Netz39 e.V. and contributors