Skip to content

mosfitech/mosfitech_api

Repository files navigation

Mosfitech API

Maintainability PRs Welcome

Documentation

See MOSFITECH API DOCS for detailed instructions on how to get started with our project.

Installing Locally

To get the whole environment up locally (without Docker), you need to install and configure multiple technologies like:

  • Mongodb
  • Mosquito Mqtt
  • Redis
  • Nodejs

It is complex, that is why we recommend using Docker.

Docker quickstart

  1. Copy the environment file, and edit variables, domain name, etc

    cp env.example .env

  2. Start basic services (recommended)

    In a new terminal window do:

    docker-compose up app db

    See the docker-compose.yml file depends_on: section to see which containers depend on which.

    Available containers:

    • mongo - mongodb
    • redis
    • web container which tries to get a certificate with Lets Encrypt.
    • mqtt EMQ + management interface on http://localhost:18083 admin:public
    • mqtt-task a rake task which subscribes to the mqtt service

    Start ALL of them (not recommended) with:

    docker-compose up

Deploying

Using Docker

  1. SSH into the server
  2. git pull
  3. docker-compose build
  4. docker-compose up -d

Versioning

Currently using this tool to manually handle versioning: https://github.com/gregorym/bump

Use this command to update the VERSION file + create a git tag

bump patch --tag

Then push the git tag with:

git push --tags

Credits 🎉

Part Of Mosfitech

License

This project is licensed under MIT.

About

The Mosfitech Engine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published