Skip to content

Ganthepro/iot-infrastructure

Repository files navigation

IoT Infrastructure

Clone Git Repository

git clone https://github.com/Ganthepro/iot-infrastructure.git

Development Setup

  1. Install dependency, run this following command

    pip install -r requirements.txt
  2. Set up the .env file using .env.example as a reference

    DB_USERNAME=postgres
    DB_PASSWORD=P@ssw0rd!
    DB_HOST=localhost
    DB_DATABASE=postgres
    RABBITMQ_HOST=localhost
  3. Run main.py from the data_logger folder

    cd data_logger
    python main.py
  4. Run main.py from the iaq_sensor folder

    cd iaq_sensor
    python main.py
  5. Navigate to the api folder, run this following command

    cd api 
    fastapi dev

Production Setup (Docker Compose)

  • Prerequisite: Docker Engine

    Install

  1. Set up the .env file using .env.example as a reference

    DB_USERNAME=postgres
    DB_PASSWORD=P@ssw0rd!
    DB_HOST=postgres
    DB_DATABASE=postgres
    RABBITMQ_HOST=rabbitmq
  2. Run Docker Compose script, using this following command

    docker compose up -d --build

API Swagger

Open the API Swagger documentation in your browser by navigating to http://127.0.0.1:8000/docs or http://localhost:8000/docs

{E832DC68-7F1D-4D23-8CE9-7247678B157A} Use the API Swagger documentation to query sensor data from the database and delete all data.

About

Simple Platform for OTA update

Resources

License

Stars

Watchers

Forks

Packages

No packages published