

- #Host flask sqlite install#
- #Host flask sqlite update#
- #Host flask sqlite software#
- #Host flask sqlite code#
In this section you configure NGINX as a web server and reverse proxy for the Flask application.
#Host flask sqlite software#
NGINX is open-source software that can be used as a high-performance web server, reverse proxy, load-balancer, and more.
#Host flask sqlite install#
Prepare the Production Environment Install and Configure NGINX Now that the Linode contains the application files, you can move on to prepare the production environment. Replace the example IP address with the IP address of the Linode and flask_app with the name of the root directory of the project: scp -r flask_app_project/ the application is copied, navigate to the /home directory of the Linode and view the contents of the directory that you copied: ls flask_app_projectĪn output similar to the following appears: flask_app FlaskDeployment.md README.md Remote: Total 79 (delta 26), reused 66 (delta 16), pack-reused 0įrom the local machine, secure copy (SCP) the project into the /home directory of the Linode. Remote: Compressing objects: 100% (57/57), done. If you are not using the example repository, Example Flask Blog Application, replace the example repo with the name of the repo that you want to use: git clone git clone Replace the example IP address with the IP address of the Linode: ssh to the home directory of Linode: cd ~Ĭlone the project from the remote version control system.
#Host flask sqlite code#
Clone the App From Source ControlĮnsure that the latest Flask application code is available in the project’s remote repository. If you prefer, you can store the application files in a different directory, however, ensure you run the examples in the directory of the application. This guide’s examples transfer the Flask application files to the Linode’s /home directory. This section provides steps for both options. You can accomplish this by either cloning the GitHub project to the Linode using Git or by using the secure copy method to directly transfer the application files to the Linode. You need to copy the local Flask application code to the Linode. You may also wish to set the timezone, configure your hostname, create a limited user account, and harden SSH access.Īfter creating the Flask application in the local development environment, you are now ready to deploy it to a production environment.
#Host flask sqlite update#
See our Getting Started with Linode and Creating a Compute Instance guides.įollow our Setting Up and Securing a Compute Instance guide to update your system. If you have not already done so, create a Linode account and Compute Instance. If you are not using the example application, host the Flask application code on a remote version control system, such as GitHub. The root directory of the application is flask_app_project. The Example Flask Blog Application is used throughout this guide. In this guide you complete the following:Ĭopy an existing Flask application from a local development environment to a production environmentĬonfigure the Flask application’s production environment variables

This guide does not cover creating a Flask application or related Python concepts. The production environment uses NGINX as the web server and reverse proxy, Gunicorn as the web server gateway interface (WSGI) application server, and Supervisor for monitoring and auto-reloading Gunicorn should it go down. This guide walks you through the steps to deploy a Flask application to a production environment running on a Linode. After you have developed a Flask application in a local environment, you need to prepare the application’s production environment in order to run the application and serve it to the users of the application through the internet. Flask is a light-weight web framework for Python that includes several utilities and libraries you can use to create a web application.
