Skip to content

Quickstart: Deploy a Flask App

This guide will walk you through deploying a production-ready Flask application on Seenode. We’ll use Gunicorn as our production WSGI server.

Get started in seconds by deploying a pre-built Flask template.

Follow these steps to deploy your existing Flask application from a Git repository.

  1. Prepare Your Flask App

    Ensure your project is configured for production.

    Project Structure

    Your project should have an app.py file and a requirements.txt.

    • Directorymy-flask-app/
      • app.py
      • requirements.txt

    Example app.py

    Seenode will look for an app instance in your app.py file.

    app.py
    from flask import Flask
    app = Flask(__name__)
    @app.route("/")
    def hello_world():
    return "Hello, from Seenode!"

    requirements.txt

    Your requirements.txt should include flask. For production, we also recommend a WSGI server like gunicorn.

    requirements.txt
    flask
    gunicorn
  2. Deploy on Seenode

    Follow these steps to deploy your Flask application:

    1. From the Seenode Dashboard, create a New Web Service, connect your Git provider, and select your Flask project’s repository.

    2. Configure your service’s settings. For a typical Flask app, you can use the following:

      • Build Command: pip install -r requirements.txt
      • Start Command: gunicorn app:app --bind 0.0.0.0:8000
    3. Choose your preferred instance size and create the service.

    4. Watch your deployment progress in real-time in the Logs tab.

    5. Once complete, your application will be accessible via your service’s URL.

Now that your Flask app is deployed, here are some recommended next steps: