Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 792 Bytes

README.md

File metadata and controls

10 lines (9 loc) · 792 Bytes

This is a basic example of an app which uses aiohttp. The key code of note is:

  1. It runs all the API routes off of the SCRIPT_PATH environment variable which is supplied by the custom apps runtime. This is required because datarobot performs liveness checks to the root path.
  2. It routes calls from / to //. This is important because the liveness checks get sent to the root (eg: /custom_applications/ and we need to redirect that to /custom_applications// so the result is not a 404.
  3. It runs on port 8080

To get this running on custom apps, simply run docker build . -t my-aiohttp-custom-app to build the image, then run docker save my-aiohttp-custom-app -o myAiohttpApp.tgz to save the app to a tgz. That tgz can then be uploaded on the applications page.