I'm a flask newbie.
I have an experience of deploying java based scalatra web project on aws elastic beanstalk and it was so easy because what I've done was just making "filename.war" file and upload it by using 'upload and deploy' button on elastic beanstalk dashboard.
Is there any easy way to deploy flask web application like I did when I was deploying java based project?
When I deploy Flask applications, I want to know what file format should I use to use the 'upload and deploy' button on the aws elastic beanstalk dashboard.
答案 0 :(得分:0)
it is possible to generate a package representing a python app / flask app. i don't know that you can dump the result into the elastic beanstalk console like you can a war. luckily, the command line tools are easier anyway. ;)
once you have a flask app in the ~/eb-flask
, directory, it's apparently:
# initialize elastic beanstalk app:
~/eb-flask$ eb init -p python2.7 flask-tutorial
# create a load balanced app in elastic beanstalk (five minutes or so):
~/eb-flask$ eb create flask-env
# open the site in a browser
~/eb-flask$ eb open
# kill it when done
~/eb-flask$ eb terminate flask-env
Elastic beanstalk flask docs include the whole process of writing a sample app and running it, and the steps I referenced are from here.