Deploy with Render: a step-by-step guide.

With its full compatibility with Python, deploying with Pathway is as easy as deploying any Python project. New tools have made deploying on the cloud effortless. For instance, Render allows you to deploy your Python-based web services in one click.

In this article, you will learn how to deploy your Pathway web service using Render. You will see, step by step, how to deploy a Pathway web service hosted on a public GitHub repository. As an example, this tutorial will show you how to deploy Pathway chatbot answering questions about documents.

What this guide is about

This guide will show you how to deploy a Pathway web service using Render. It relies on the free offer of Render. Here are the requirements for the project:

  • Contains a Dockerfile at the root.
  • It must bind to a port on host 0.0.0.0 to receive HTTP requests from external connections on port 10000.
  • Ports 18012, 18013, and 19099 are reserved by Render and cannot be used.

You can learn more about the free offer on the official documentation.

Note that we are going to use to deploy from a public repository, but you can easily deploy from a private one by connecting to your GitHub/GitLab by connecting to your account from Render.

Create an account on Render

The first step is to create an account at Render.

  1. Click on the "Sign In" button:
image Sign In button
  1. Choose your favorite way of logging. You can either use a GitHub, GitLab, or Google account. You can also create an account with an email and password.
image Sign In choice

You now have a Render's account.

Create and deploy your Pathway web service

Now that you have an account, you need to deploy your app. Render allows you to deploy service types for hosting your app. In our case, we want to deploy a web service as it is available in the free offer.

  1. Let's create a new project by clicking on "New Web Service":
image create a new web service
  1. Select "Build and deploy from a Git repository" and click on "Next":
image build from GitHub and Next
  1. Enter the public Git repository that you want to deploy. In our example, this is https://github.com/pathway-labs/realtime-indexer-qa-chat:
image public Git repository

Note: you can deploy a private repository if you are logged in with your GitHub account.

  1. Enter the parameters. Everything should be already filled by default value. Select a region near you as some or your data will be processed in this region:
image chose region
  1. Select the "Free" instance type:
image free offer

You can start most projects with the free instance of Render. However, this free offer comes with limitations. You can learn more on the free offer on Render documentation.

  1. Enter the environment variables. In our example, you need to enter the OpenAI key by using the variable OPENAI_API_KEY:
image OpenAI API key

You can directly load a .env file.

  1. Click on "Create Web Service":
image create button

That's it! Your app is being deployed by Render and will be soon available. The process takes around 5 minutes.

You should have the message "Your service is live" once it is ready:

image your service is live

Access your project

Once your app has been deployed, you can access the web service by clicking on the URL:

image click URL

It will open your web service:

image live chatbot

You can then use your app. You can ask the chatbot the question "Can I build an LLM app with Pathway?":

image create a new web service

You can learn more about this example on GitHub.

Stop and delete your web service

To stop and delete the service, you have to go to the settings.

  1. Go to the dashboard:
image go to dashboard
  1. Click on the three-dot button then on "Settings":
image three-dot and settings buttons
  1. Click on "Delete Web Service" at the end of the page:
image delete button
  1. Copy the delete command and validate:
image delete validate

Conclusions

By being fully Python-compatible, Pathway allows you to use all the available tools to deploy your app. Using tools like Render, deploying your Pathway web service app is doable in a few clicks! Don't hesitate to check out the other ways to deploy Pathway in our dedicated article.