Skip to content

Here's my portfolio, deployed to EC2, got a domain on Route 53, tied it to a static IP and SSL'd it.

Notifications You must be signed in to change notification settings

isdlyusukeshimizu/portfolio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask Application Deployment

During Local Development

The method for running an application with a development server is explained on the following page. Note that it should not be used in a production environment. (Flask Documentation on Development Server)

There are two ways to run hello.py on a development server:

  1. Using the flask run command:

    $ flask --app hello run
    
  2. Including the following run method in the code:

    if __name__ == "__main__":
     app.run(debug=True)

    To run the application:

    $ python hello.py

Production Environment

The method for deploying to a production environment is explained on the following page (Flask Documentation on Deployment)

In a production environment, a WSGI server should be used. There are also methods to use it in combination with an HTTP server such as Apache (Reverse Proxy).

Examples of WSGI servers (refer to the above page for details)

  • Gunicorn
  • Waitress
  • mod_wsgi
  • uWSGI

Reverse Proxy Configuration with Apache Server

Instructions on configuring a reverse proxy with Apache Server are explained on the following page (Flask Documentation on Apache HTTPD Deployment)

For more detailed information, refer to Apache’s documentation or wiki

About

Here's my portfolio, deployed to EC2, got a domain on Route 53, tied it to a static IP and SSL'd it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published