Simple Signup Form with Docker
This Python sample application uses the Flask framework and Bootstrap to build a simple, scalable customer signup form that is deployed to AWS Elastic Beanstalk. The application stores data in Amazon DynamoDB and publishes notifications to the Amazon Simple Notification Service (SNS) when a customer fills out the form.
This version of the application has been modified so it can be packaged and deployed as a Docker container.
Quick Start - eb
CLI
Follow the steps below to deploy the demo application to an Elastic Beanstalk Docker environment. This assumes you have the eb
CLI installed, see Getting Set Up with EB Command Line Interface.
git clone https://github.com/awslabs/eb-py-flask-signup.git
cd eb-py-flask-signup
git checkout docker
eb init -p Docker
eb create dev-env
eb open
Quick Start - Management Console
Follow the steps below to deploy the demo application to an Elastic Beanstalk Docker environment. Accept the default settings unless indicated otherwise in the steps below:
- Download the ZIP file from Releases at https://github.com/awslabs/eb-py-flask-signup/releases/tag/docker-v1.0
- Login to the Elastic Beanstalk Management Console
- Click
Create New Application
and give your app a name and description - Choose 'Docker' in the 'Predefined configuration' dropdown and click
Next
- Upload the ZIP file downloaded in Step 1
- Review and launch the application
The Docker Parts
Packaging this Python application with Docker required us to add two files:
-
Dockerfile
- Elastic Beanstalk uses Docker on each of your EC2 Instances to build the Docker Image described by this file:FROM ubuntu:14.04 # Update packages RUN apt-get update -y # Install Python Setuptools RUN apt-get install -y python-setuptools # Install pip RUN easy_install pip # Add and install Python modules ADD requirements.txt /src/requirements.txt RUN cd /src; pip install -r requirements.txt # Bundle app source ADD . /src # Expose EXPOSE 5000 # Run CMD ["python", "/src/application.py"]
-
Dockerrun.aws.json
- This file describes how to run the Docker Image created by theDockerfile
. It indicates that/var/app
on the EC2 Instance should be mapped to/var/app
on the Docker container, and instructs Elastic Beanstalk to copy log files from/var/eb_log
on the container to S3:{ "AWSEBDockerrunVersion": "1", "Volumes": [ { "ContainerDirectory": "/var/app", "HostDirectory": "/var/app" } ], "Logging": "/var/eb_log" }
Instructional Videos
This app includes a quick 3-part video series on YouTube that will walk you through deploying, using, and customizing the application in 10 minutes or less.
An Important Note About Part 1
The Part 1 video below describes how to deploy the non-Docker version of this application. To deploy this Dockerized sample, do two things:
- Download the Docker-specific ZIP file from the Releases page described in the video.
- Choose 'Docker' instead of 'Python' in the 'Environment Type' step of the wizard.
- Part 1: http://youtu.be/rsg4YI4mljg
- Part 2: http://youtu.be/IuwfVX52PV8
- Part 3: http://youtu.be/DrRr-JgdgzE
Features
Themes
The code includes several Bootstrap themes from bootswatch.com. You can dynamically change the active theme by setting the THEME environment variable in the Elastic Beanstalk Management Console:
Installed themes include:
- amelia
- default
- flatly
- slate
- united
Flask Debugging
Similar to themes, you can control Flask debugging by toggling the FLASK_DEBUG env var from the Elastic Beanstalk Management Console.
Releases 3
Packages 0
Contributors 7
-
【天天返水,月退回饋】
『通博娛樂城』全台運彩最高賠率 0.97
『通博娛樂城』黃金俱樂部. 歐博百家真人視訊
『通博娛樂城』5分鐘快速入帳. 贏$$馬上領
『通博娛樂城』ATM. 各大超商代碼皆可以儲值
『通博娛樂城』結合全球各大球版博奕遊戲
『通博娛樂城』一組帳號玩到底
『通博娛樂城』各大美女荷官線上發牌通博娛樂城│真人百家樂│視訊21點│通博娛樂城 線上真人娛樂城 http://tb588.net/?p=GGAAW
>歐博>沙龍>DG 【各式真人百家樂】│>沙龍>QT>捕魚機 【各式電子遊戲】
體運投注│足球│棒球│運動分析│MLB│世界盃│ 體育賽事都在http://tb588.net/?p=GGAAW
多款網路視訊博弈網頁與手機板24H不打烊服務,美女線上客服也24H都為您服務喔!
免費註冊http://tb588.net/?p=GGAAW★首次儲值1000送1000開運金$$$$$