43 | | To start the sample application navigate to the main directory and run {{{./gradlew build}}} followed by (TODO). |
| 43 | If you are running docker on another machine you need to tell the sample application the IP docker and the services are running on. |
| 44 | Do so by setting the environment variable `DOCKER_HOST_IP`. E.g. by executing: `set DOCKER_HOST_IP=www.xxx.yyy.zzz`. |
| 45 | If you run docker on the same machine, you do not need to do this. |
| 46 | |
| 47 | To build the sample application navigate to the main directory and run {{{./gradlew build}}}. |
| 48 | The build process will attempt to reach the running services, so a `BUILD FAILED` most likely indicates, that the services could not be reached under the IP specified. |
| 49 | |
| 50 | After successful compilation, the application can be run by executing {{{./gradlew bootrun}}}. |
| 51 | Once the application hast started successfully the log shows the line {{{Started BookStoreExampleApplication in xxxx seconds (JVM running for xxxx)}}} |
| 52 | |
| 53 | Open up a second terminal and run the command {{{curl -X POST localhost:8080/order?creditCardLimit=500}}} |
| 54 | This will issue the order to run a Saga in the system. |
| 55 | The system generates a random book price and tries to order it from the (cent) limit supplied by the call (500 cents). |