IOT-Controller is the platform in charge of manage Deliveries and Dispersions.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
- Ruby 2.5.1
- Using Docker for Development
- Docker version 17.03.0-ce or higher
- Docker Compose version 1.21.2 or higher
- Neo4J 3.5.3
A step by step series of examples that tell you how to get a development env running
- Set the environment variables with Figaro gem. Complete the variables preloaded in
config/application.yml
- Run
sudo docker-compose run web rake neo4j:migrate
to add migrations to the database. - Run
sudo docker-compose run web rails db:seed
to initialize the database. - Run
sudo docker-compose run web rails r
before each script located in scripts folder.
If you want to migrate test database, you should add RAILS_ENV=test
before each command
- Run app in development mode
sudo docker-compose up
- Run app locally but with production configuration
sudo docker-compose -f docker-compose.prod-local.yml up
- Run app in production mode
sudo docker-compose -f docker-compose.prod.yml -p iot_controller up
- Create a migration:
rails generate neo4j:migration RenameUserNameToFirstName
- Run
sudo docker-compose run web rspec spec
for Ruby tests. - Run
sudo docker-compose run web rake rswag:specs:swaggerize
for RSwag generators
Follow this good practices:
sudo docker build -t zonawik1/iot_controller:version .
sudo docker push zonawik1/iot_controller:version
- This command should be used carefully; it will delete the entire Redis DB.
- Run in rails console
Sidekiq.redis { |r| puts r.flushall }
- If there is a overcommit memory, please checkout Redis logs:
sudo docker-compose -f docker-compose.prod.yml -p iot_controller logs --tail=1000 -f redis
This repository use Capistrano gem for deployment. Please read the documentation first.
- Run
script/up
to deploy the app to AWS.
Delete all nodes of specific label
MATCH (n:City) DETACH DELETE n
Delete EVERYTHING IN DB (CAREFUL)
MATCH (n) DETACH DELETE n
This is a private repository.
- Nathaly Villamor - Tech Lead at ProCibernética - Nathaly
- William Calderon - Full stack developer at ProCibernética - William
- Daniela Patiño - Full stack developer at ProCibernética - Daniela
- Jeisson Moreno - DevOps Engineer at ProCibernética - Jeisson
- Javier Varón - QA Developer at ProCibernética - Javier
See also the list of contributors who participated in this project.