- Demo repo to deploy Streamlit private repo to Azure service.
- Note: This guideline is written on August 2023. Any changing or deprecation might be happened in the future.
- Search App Serives and click it. Then click
Create
and chooseWeb App
. - Choose existed Resource Group (
rg_invoke
) - Write app name. Please ensure the name is descriptive as possible. ie.
analytics-dashboard-web-app
- For Publish, choose
Code
(if you have container, chooseContainer
) - Choose runtime stack (
Python
). Please ensure the Python version is similar to the Python version that you used on local development. - Select region (
Southeast Asia
) - Select operating system (Linux is recommended)
- Create Linux-plan name. Please ensure the name is descriptive as possible. ie
linux-analytics
- Choose pricing plan for compute resources. Refer experience developer/lead to get some advice on the choice.
- Ignore Zone redundancy.
- Move to Step 2.
- On the same page, click Deployment tab.
- Click Enable for Continuous deployment.
- On Github account, link to your Github account.
- Choose organization (
INVOKE-Analytics
) - Select project repository name.
- Select branch to deploy.
- Click Review + create. Please ensure all the description is correct following to your deployment plan.
- Click Create.
- Move to Step 3.
- Click your web-app name in App Service.
- Click Configuration (Under settings)
- Click General settings
- Ensure the stack is Python, major version and minor version is correct.
- Insert the following line for startup command. The
main.py
is referred to the top script to deploy.
python -m streamlit run main.py --server.port 8000 --server.address 0.0.0.0
- Click Save.
- Move to step 4.
-
Open your project repo on Github.
-
You will see there is
.github/workflows
directory created by Azure for the CI/CD. -
Click Actions.
-
A workflow should be running.
-
Wait until the process is finished.
-
If the workflow failed, rerun the workflow.
-
If the workflow succeed, click the link return by the workflow.
-
You will be redirected to your Streamlit app.
-
Deployment finished.
-
Congratulation you have deployed your app on Azure!
1.Go to Overview & see the default domain & click on it 2.Please wait(Azure could be slow based on the compute resources) & you will see the page is loaded