Skip to content

Commit

Permalink
Add env variable and route to shutdown demo service
Browse files Browse the repository at this point in the history
  • Loading branch information
VaishSiddharth committed May 8, 2024
1 parent 8b7c108 commit 3a5043b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions demo/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ services:
- OPENMRS_URL=http://openmrs:8080/openmrs
- OPENMRS_USER=${OPENMRS_USER}
- OPENMRS_PASSWORD=${OPENMRS_PASSWORD}
- ENABLE_SHUTDOWN_ENDPOINT=true
volumes:
- "${EIP_DEMO_DATA_CONFIG_PATH:-./eip/config}:/eip-client/config"
- "${EIP_DEMO_DATA_ROUTES_PATH:-./eip/routes}:/eip-client/routes"
Expand Down
11 changes: 11 additions & 0 deletions demo/eip/routes/generate-demo-data-route.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,16 @@
</setBody>

<toD cacheSize="-1" uri="{{openmrs.baseUrl}}/ws/rest/v1/referencedemodata/generate"/>


<setHeader name="CamelHttpMethod">
<constant>POST</constant>
</setHeader>
<setHeader name="Content-Type">
<constant>application/json</constant>
</setHeader>

<!-- Hit the Spring Boot server's actuator endpoint to shut down the server after generating demo data -->
<to uri="http://localhost:8080/actuator/shutdown" />
</route>
</routes>

0 comments on commit 3a5043b

Please sign in to comment.