Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brianbruggeman/cool_beans
Cool Beans: First hack at a Flask app on AWS Elastic Beanstalk
https://github.com/brianbruggeman/cool_beans
Last synced: 25 days ago
JSON representation
Cool Beans: First hack at a Flask app on AWS Elastic Beanstalk
- Host: GitHub
- URL: https://github.com/brianbruggeman/cool_beans
- Owner: brianbruggeman
- License: unlicense
- Created: 2015-08-15T02:44:37.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-08-15T03:13:11.000Z (about 9 years ago)
- Last Synced: 2024-05-01T21:50:47.301Z (6 months ago)
- Language: Python
- Homepage:
- Size: 148 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cool Beans
AWS App for Elastic Beanstalk using PythonTo get started, you'll need [Flask](http://flask.pocoo.org/) and [Amazon's Elastic Beanstalk Commandline Interface](http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html):
> pip install flask
> pip install awsebcliAfter installing the pre-requisites, you'll need an Amazon account setup. Assuming that all goes well, you can then use some of the eb commands to setup and deploy the application.
> virtualenv my_cool_beans
> cd my_cool_beans
> mkdir my_cool_beans
> cd my_cool_beans # yes, that's: /my_cool_beans/my_cool_beansThe first `my_cool_beans` folder is for your virtualenv environment. The second is for your git repo, code and elastic beanstalk files.
Setup Git for this repo> git init
> git flow init
Jump into the virtualenv environment to autogenerate `requirements.txt`.> . bin/activate
> pip install Flask
> pip install docopt # This is for a commandline interface on your local folder
> pip freeze > requirements.txt
> deactivate
Now use the Elastic Beanstalk interface to generate a new instance.> eb init
And then you'll want to edit your `application.py` as you see fit.
> vi application.py
Assuming you're happily done coding, you should probably test it...
> python application.py --debug --host=127.0.0.1 --port=5000
And then go to your local instance: [http://127.0.0.1:5000](http://127.0.0.1:5000)
Now you can deploy:
> eb create
Assuming you got a successful launch, then try opening it up in your browser:
> eb open