Field data API is a REST API that manages fields and provide a weather history for a given field with a given boundary using a third partner API from OpenWeather Agro Monitoring.
- Java 16
- Spring Boot
- MongoDB
- REST Assured
- JUnit 5
- Maven
-
Clone the project
-
With a correctly configured Maven, create an executable jar file
$ mvn clean package
-
Go to directory
./fieldapi/dev
-
Build and run docker compose
$ docker-compose up --build
Ps: This command will build the images, create the defined containers and start it in one command
Ps: This directory also contains the
docker-compose-dependencies-only
in case you want to run the dependencies from docker, but the application from IDE or command prompt
- Check if the application is up and running:
http://localhost:8080/actuator/health
Swagger 2 was chosen for the API documentation and it can be accessed by:
http://localhost:8080/swagger-ui.html#/field-controller
Ps: The application should up and running