Skip to content

Latest commit

 

History

History
 
 

Readme.md

Deployment Of Flask App on Azure

Azure Web Apps provides a platform to build an App in Azure without having to deploy, configure and maintain your own Azure VM's. You can build Web App using the ASP.NET, PHP, Node. js and Python. They also integrate common development environments which could be Visual Studio and GitHub.

To Review the Implemented Deployment Please visit     https://deploymodel.azurewebsites.net/

STEPS TO FOLLOW

1. Create a Directory Containing FlaskApp, Index.html and requirements.txt   .

NOTE   :   To generate requirements .txt , go to path in command prompt or Terminal and type pipreqs.

2. Create a Dockerfile.

FROM python:3.7-slim

WORKDIR /app

ADD . /app

RUN pip install --trusted-host pypi.python.org -r requirements.txt

EXPOSE 5000

ENV NAME OpentoAll

CMD ["python","app.py"]

3. Build Your Docker Image.

docker buid -t imagename:tag

docker buid -t azuremlr:latest . 

For More details visit Dockerizing Flask App

4 . Tag your Docker Image and push to docker hub.

docker tag azuremlr tharun435/myrepo:1.0

NOTE   :    Please Create your account in Docker Hub if you don't have a one

5 .  Push your Image to Your Repositories in Docker Hub .

docker push tharun435/myrepo:1.0

6.   Go to your Azure account , Web services , click add.

  • Create a new Resource group and select Docker Container to Publish . Click Next:Docker.

7.  Select Image Source as Docker Hub and give your Image name you pushed to the docker hub in step 5   .

8. Click next Monitoring and go to tags, give port and value .

9.   Click Review and create .

Succesfully the Web app is created and a link will be generated like this. https://deploymodel.azurewebsites.net/


References

Thank You :D

I have used many online resources while creating the application and I would like to thank them .   Hope you found it insightful.If you have any queries you can mail me at : kumartharun435@gmail.com . I would love to hear feedback from you to improvise it and make it better!