📔Deploy your Flask Application to Clouddley Triggr

Learn how to deploy a Flask app to Triggr.

Clouddley Triggr is a powerful tool that enables you to deploy your Flask application seamlessly, with zero downtime on your server. In this guide, we'll walk you through the Flask application deployment process, highlighting why Clouddley Triggr is your ideal choice for efficient deployments with ease. Let's get started!

Prerequisites

Deploy your Flask Application

Optimize your codebase for deployment

To deploy your Flask application on Triggr, create a Procfile in the root directory of your project. This specifies the command used to run the application.

Procfile
web: python app.py

Accessing Clouddley Triggr

Now, let's move on to deploying your Flask application:

  • Open your web browser and sign in to your Clouddley account

  • Proceed to Triggr and click on Add app

Step 1: Configure git

  • Choose the version control platform your code is hosted on, either GitHub or Bitbucket. In this guide, we will be using Github.

  • Click on the Select username/organization dropdown and click on Add username/organization to connect your GitHub user or organization account.

    • Select your repository and the branch

  • Click on NEXT

Step 2: Configure VM

  • To configure your VM, insert your VM username, its hostname or IP address, and the VM port for ssh access.

  • Download the public key to your local machine.

  • Run the command provided in your local machine allowing Triggr to connect to your virtual machine.

ssh-copy-id -f -i ~/path/to/downloaded/Publickey username@ipaddress

  • Click on Verify. This verifies the connection

  • Click on NEXT

Step 3: Configure app settings

  • Insert the name of the application and its port.

The firewall of the virtual machine should allow access to the application port.

  • You can add environment variables by adding the key-value pair in the environment variable section and clicking on save or adding it by clicking on the + button.

  • To configure the notification settings of the application, switch the disabled button in the notification section and select which event(failed, timeout, or success) you want to be notified of.

    • Input your Email address.

  • Click on Create App

Step 4: Test and Verify the app

  • Once the app is created, it appears on the Triggr dashboard.

  • After the app deployment is complete, the app status changes from deploying to running

  • To view the application in your browser, click on the application's URL

  • Test the application functionalities to verify the deployment.

You have deployed your Flask application successfully on Triggr.

To view or download the logs, navigate to deployments and click on the icon in the actions column. You can also restart the build if needed.

Conclusion

Last updated