Problem background and design assumptions are described in the wiki.
See the api-docs on deployment of the API by browsing to the endpoint/doc, like in http://localhost:3000/doc.
- Ruby on Rails application running the API. Include a background job service.
- Database in MySQL with persisten data.
- Proposed deployment configuration using Docker.
-
Create/modify .env files ↗ for configuring the different services that will run in containers following this steps:
NOTICE: .env files shouldn't be included in a real producciton ready repo. If included is just for simplifying the demo setup.
This is a simple Docker setup for use in developing the API. It includes the services you need to run the API, including a database.
-
Install Docker
-
Create a Docker network
docker network create musalasoft-drones
-
Build the containers
docker-compose build --build-arg RAILS_ENV=development
- Start the containers in detached mode ↗
`docker-compose up -d`
If you want to stop the containers run
docker-compose down
docker-compose run web rails db:create
Create the database.docker-compose run web rails db:seed
Load initial data.
docker-compose run web rails
Instructions describing all the API methods and its parameters are defined in public/doc and can be browsed upon deployment in the url /doc
.