Example of how to deploy a Quart/Flask Server to an Azure VM with automatic deployment. More details will be added to the README.
Follow this tutorial mainly
How to Deploy Flask Application Guide
However, creating a venv was werird. In worst case, dont create a venv and just install the packages globally.
must use sudo on sudo gunicorn -b 0.0.0.0:8000 app:app
to run and see errors
sudo gunicorn -b 0.0.0.0:8000 -k uvicorn.workers.UvicornWorker app:app
[Unit]
Description=Gunicorn instance for a simple quart app
After=network.target
[Service]
User=testing
Group=www-data
WorkingDirectory=/home/testing/exampleQuartApp
ExecStart=/home/testing/exampleQuartApp/venv/bin/gunicorn -b localhost:8000 app:app
Restart=always
[Install]
WantedBy=multi-user.target
====================================
Docker Installation We have successfully logged in. Now start the Docker installation. Firstly, update our package manager with sudo apt-get update.
Check Docker documentation for more information and installation.
Type in the command line step by step.
sudo apt-get install
apt-transport-https
ca-certificates
curl
gnupg-agent
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository
"deb [arch=amd64] https://download.docker.com/linux/ubuntu
$(lsb_release -cs)
stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
https://www.docker.com/blog/how-to-deploy-containers-to-azure-aci-using-docker-cli-and-compose/