Skip to main content

Getting Started on Porter with Python

In this tutorial-style guide, we will be deploying a sample Python app to Porter, using the Django framework.

Prerequisites

To proceed further with this guide, you will need access to a Porter account. You also need to setup your Porter account with Github in order to deploy the app. You may follow the Adding/Updating the Porter Github App guide to do this.

Set up

Porter has a sample getting started Python app on Github at porter-dev/python-getting-started. If you look at the repository, you will find that it is a template repository which means that you can simply click on the Use this template button on the frontpage of the repository or navigate to python-getting-started/generate to generate a new repository based on this template.

Deploy app to Porter

In the Porter dashboard, go to the Launch tab.

Launch Tab 1

Click on Web Service > Launch Template and choose the Git Repository deployment method.

Launch Tab 2

Choose the repository you generated in the Set up step. If you cannot find the repository from the search bar, make sure that you have given access to the Porter Github app. Refer to Updating the Porter Github App to do this.

Launch Tab 3

Click on the main branch, then click on Continue. You will be presented with a screen that looks like the following.

Launch Tab 4

Click on Continue > Deploy. This will start deploying your app to Porter after which you will be redirected to the applications view. Here you will be able to see your newly created app.

Applications View

Click on the app in the applications view and you should be able to see the URL which will serve your newly created Python app.

App URL

Once the app is successfully deployed, navigate to the URL as above and you should see something like the following.

Python App

Congratulations! You just deployed your first Python app on Porter!

Next steps

Now that you have deployed your first app on Porter, feel free to make changes to the git repository that you created from porter-dev/python-getting-started and push updates to your Porter app. You should also check out the documentation for some of the advanced topics.