Web App deployment with FastAPI

elsammons Member Posts: 8

Any one successfully deploy with FastAPI. This should be straight forward but my app is failing after running for a few seconds.

My app.sh

!/usr/bin/env bash
cd /mnt/app; python main.py

This works from a jupyterlab terminal just fine, not sure why the web app deployment is failing.


  • jaclyn.patterson
    jaclyn.patterson Member, Administrator, Moderator, Domino Posts: 31 admin

    Are you getting any errors when you try to publish? Also, can you try moving your app.sh and main.py file into the /mnt directory and remove the cd command?



  • katie.shakman
    katie.shakman Administrator, Domino Posts: 257 admin

    Alternatively, if you need main.py to stay in the /mnt/app for any reason, you could try specifying the full path in your app.sh, e.g.:

    !/usr/bin/env bash
    python /mnt/app/main.py

    Note that you can also use the built-in Domino environment variable for the working directory instead of /mnt, which is useful in some situations where the Domino working directory might change (including if you have imported projects). If you do that, you would have something like this in app.sh:

    !/usr/bin/env bash
    python $DOMINO_WORKING_DIR/app/main.py


    Field Data Scientist @ Domino

  • elsammons
    elsammons Member Posts: 8
    edited August 2020

    @jaclyn.patterson Looks like things are up and running (sort of). App Status is running and everything looks good in the execution details:

    INFO:     Uvicorn running on (Press 

    However, I have no idea what IP the app is listening on and when I click view app I get nothing, but this could be related to FastAPI which requires that you navigate to https://<server>:<port>/docs to access the autodocumentation. Appending /docs to the end of the view app url did not work either.

    When I navigate to the web app via copy link or view app button I get the following:

    There Is No App Associated with This Project
    This project does not contain a published app. You can publish an app to share your work with others. Need help getting started? Read our support documentation

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!