After developing and testing your Simian Web App locally, deployment to the web. This involves two main steps:
- Publishing the app to your audience on Simian Portal
- Deploying your Simian Web App Python code as a web service on a(ny) backend
For evaluation purposes, a shared Simian Evaluation Portal is readily available.
For deployment, Render offers convenient and free hosting Python code as a web service, directly from GitHub.
Publishing your Simian Web App:
- Sign up at Simian Evaluation Portal.
- From your Render deployment (per steps below), take note of:
The subdomain of your backend deployment under .onrender.com
The API Key (if configured per instructions in main.py) - In Simian Evaluation Portal, configure and publish app here by setting the onrender.com subdomain, and the (optional) API Key.
- Start your app via Simian Evaluation Portal and bookmark the app link for direct access.
Notes:
- Simian Portal supports app sharing and access management, but app access on Simian Evaluation Portal is restricted to yourself only and solely serves evaluation purposes.
Contact simiansuite.com for Simian Portal cloud, and on-premises options. - Simian Portal works with a range of backend platforms from docker to Azure, and other cloud providers. For evaluation purposes render.com has been chosen because of its convenient deployment path from code on GitHub to a live FastAPI web service, its free entry offering and paid upgrade path, and last but not least because your code remains under your control.
Use this repo as a Simian Web App template to deploy a Python FastAPI web service on Render.
- Render build information is provided in
render.yaml
. - Python package installation instructions are provided through
requirements.txt
. - FastAPI routing, API key configuration and Simian Web app module configuration is done in
main.py
. - A simple Simian Web App example is provided in
helloworld.py
If you fork this repository, you should modify the github project url in this readme.md
under "Manual steps 1." and "Deploy to Render" button to point to your GitHub repository.
Note:
- The free individual offering from render.com does spin down web services after some period of inactivity (15 minutes at the time of writing). When starting the Simian Web App after such period of inactivity it needs to be spinned up causing a delay of 1 minute or more. Consider upgrading to a paid render.com plan to avoid spinning down.
See https://render.com/docs/deploy-fastapi or follow the steps below:
-
You may use this repository directly or create your own repository from this template if you'd like to customize the code.
-
Create a new Web Service on Render.
-
Specify the URL to your new repository or this repository.
-
Render will automatically detect that you are deploying a Python service and use
pip
to download the dependencies. -
Specify the following as the Start Command.
uvicorn main:app --host 0.0.0.0 --port $PORT
-
Click Create Web Service.
Gratefully forked from Render Examples - FastAPI who thanks Harish for the inspiration to create a FastAPI quickstart for Render and for some sample code!