How to Deploy Flask with Marketplace Apps
Traducciones al EspañolEstamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Flask is a quick and light-weight web framework for Python that includes several utilities and libraries you can use to create a web application. It is designed to make getting started quick and easy, with the ability to scale up to support more complex applications.
Deploying the Flask Marketplace App
The Linode Marketplace allows you to easily deploy software on a Linode using the Linode Cloud Manager.
Log in to the Cloud Manager and select the Marketplace link from the left navigation menu. This displays the Linode Compute Create page with the Marketplace tab pre-selected.
Under the Select App section, select the app you would like to deploy.
Fill out all required Options for the selected app as well as any desired Advanced Options (which are optional). See the Configuration Options section for details.
Complete the rest of the form as discussed within the Getting Started > Create a Linode.
Click the Create Linode button. Once the Linode has provisioned and has fully powered on, wait for the software installation to complete. If the Linode is powered off or restarted before this time, the software installation will likely fail. To determine if the installation has completed, open the Linode’s Lish console and wait for the system login prompt to appear.
Follow the instructions within the Getting Started After Deployment section.
Software installation should complete within 2-5 minutes after the Linode has finished provisioning.
For advice on filling out the remaining options on the Create a Linode form, see Getting Started > Create a Linode. That said, some options may be limited or recommended based on this Marketplace App:
- Supported distributions: Debian 9
- Recommended minimum plan: All plan types and sizes can be used.
Getting Started after Deployment
In addition to installing Flask, this Marketplace app installs and configures software to support running Flask in a production environment. Below is a list of the installed software:
NGINX web server is installed with a basic NGINX configuration, located in
/etc/nginx/sites-enabled/flask_app, and listening on your Linode’s IP address.
- An example Flask application is downloaded to your Linode’s
/home/flask_app_projectdirectory. If you visit your Linode’s IP address, you will see the example Flask application running and serving boiler plate blog content.
- Your example Flask application’s environment will be configured with basic settings located in the
- Gunicorn, a Python WSGI (web server gateway interface) HTTP Server for UNIX, is installed and running. It is used to forward requests from your NGINX web server to your Flask application.
- Supervisor, a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems, is installed and running on your Linode. Its configuration file can be found in the following location,
- The example Flask app’s logs can be found in the following locations,
NoteCurrently, Linode does not manage software and systems updates for Marketplace Apps. It is up to the user to perform routine maintenance on software deployed in this fashion.
Now that you are familiar with all the software installed on your Linode with the Flask Marketplace app, you can explore the following steps:
- Connect to your Linode via SSH. You will need your Linode’s root password to proceed. You can explore the installed programs and update any configurations as needed. Consider following the steps in the Securing Your Server guide to continue hardening your Linode’s security.
- Read through our Deploy a Flask Application on Ubuntu guide, which takes a deeper dive into the example Flask app that is deployed by the Marketplace app.
- Visit our Create a GIS Application using Flask, Stadia Maps, and MongoDB guide to learn how to create your own GIS application.
- Consult our How To Create an OAuth App with the Linode Python API Library to learn how to develop a Flask app using Linode’s API to automate creating Linode resources.
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This page was originally published on