This is a python-oriented template for app developers. New apps developed in python should follow this template.
- Create a new app repository and use this repo as a template.
- Under
.github/workflows/tag.yml, changemy-appto your new app name (alias). - Under
.env.example, add any environment secrets that your app needs in order to run for local development. - Under
build.sh, add any build instructions that should be executed when creating a new image for this app. - Under
main.sh, add any launch instructions that should be executed when the image is booting up.- You will likely want to also adjust
localdev.pyto add those commands to thestart_app()method. - For multi-server applications (e.g. streamlit + fastapi), you will want to add
nginxand concat the servers, e.g.:streamlit run --server.port 8501 --server.address 127.0.0.1 --server.enableCORS true --server.fileWatcherType none src/streamlit_app.py & python -m src.fastapi_app & nginx -g 'daemon off;' -c $(pwd)/nginx.conf
- You will likely want to also adjust
- Under
.vscode/launch.json, specify all the modes with which local development can launch the app.- If there are multiple servers to this app (e.g. streamlit + fastapi), it is good practice to keep them as separate launch commands
- Under
Dockerfile, change the base image, if needed.- In most cases, you'll want either
octostar/streamlit-apps-gpuoroctostar/streamlit-apps-no-gpu
- In most cases, you'll want either
- Under
.python-version, change the expected python version for this application. Note that this may be fixed depending on the base docker image used to build this application.octostar/streamlit-apps-gpu-> 3.10octostar/streamlit-apps-no-gpu-> 3.11
- Under
manifest.yaml, add the app image, alias, secrets schema, and any other manifest-related configs. - Finally, modify the
README.mdto document your application and make it easier to share, use, and maintain.
Following is the typical README.md format that app developers should complete to describe the application, what it does and how to use it.
Two-three sentences slogan for the app.
Dotted list of the main app features.
Concise install guide for production, including required app secrets. Conclude with how to open the app (e.g. if it has context menu interactions).
User-friendly description of how the app should be opened, on what entities/files it works and what are the main operations/flows that can be performed with it.
Question/Answer pairs to troubleshoot common issues or limitations of the application.
Description of the core structure of the app from a developer's point of view; what to do and what not to do when working with the app.
List of known bugs, edge cases or missing features under which the app will not work as expected.