Home > OS >  deploy first django test app to anywhere (azure or heroku)
deploy first django test app to anywhere (azure or heroku)

Time:05-05

tldr; - When I have deployed a flask app in the past, it uses a requirements.txt file in the main root of the project folder so that azure or heroku can understand what modules need to be installed. However, this is the first time I am messing with django. I am trying to test deploy to azure or heroku but I azure can't detect the stack of the app because there is no requirements.txt file in the main root of the folder.

From messing with django a little bit, it seems alot more complicated than flask. What can I do to test deploy the most basic app to azure app services or heroku or aws or any place in general?

I tried deploying the django app like I normally do with flask but received an error:

Could not auto-detect the runtime stack of your app.
HINT: Are you in the right folder?
For more information, see 'https://go.microsoft.com/fwlink/?linkid=2109470'

Here is a picture of what I am seeing on my side: enter image description here

I would assume I am not in the right folder but I am not sure if that is the problem completely.

Here is app I am testing myself. Its a microsoft authenication test app where you can test your xbox live account, microsoft school account, or microsoft work account against the webpage: https://github.com/Azure-Samples/ms-identity-python-django-tutorial

**Of course I added the app registration information from azure. Infact, the same app registration information works on my flask app so any azure app registrations issues is probably not the issue. **

CodePudding user response:

The repo you link contains multiple projects. It sounds like you need to clone this, then move one of the project sub-directories (which should have its own requirements.txt already) into a fresh working tree, initialize a new repo there, and then push that to the cloud provider.

  • Related