How to host a website in 2022

Aditi Shah
The Patr-onus Deployment Blog
4 min readJul 1, 2022

--

Maybe your resolutions for 2022 include reading a book, calling your mom, exercising to burn off your new quarantine baking hobby, or setting up a snazzy new website for your business? One of these tasks doesn’t need to be put off until next Monday. And that’s the last one. In fact, it’s the simplest.

So, let’s dive straight into the process.

Step 1: Create a Patr account

All you need to get started is a sign-up on app.patr.cloud.

Option 1 — If your application has a backend, then follow this.

Step2: Create a Docker repository on Patr

Docker has become the preferred way to containerize modern applications and services. Patr provides first-class support for running docker images. We will create a docker registry for your docker images.

For deploying docker images on Patr, first, we need to create a private Docker repository on Patr.

  1. Go to Docker Repository -> Create Repository

2. Enter the repository name of your choice, for this example let it be “NodeJS”.

3. Then click Create. Once you copy you can get the docker repo information like repository URL, size etc.

Step 3: Create a deployment for your app

Go to Infrastructure -> Deployment -> Create a new deployment on Patr

i. Enter the name as “nodejs”.

ii. Choose image details as “nodejs”.

iii. Choose tag as “latest”.

iv. Choose a region nearest to your location in the dropdown menu.

v. Click “Next”.

Based on your app select the port, env variables or secrets if you have created any. In this tutorial, we would go with port only.

Then press next and select the deployment strategy on push or on create, a select the number of replications for the app and select the machine type and then press Create.

You will see a card like this:

Step 3: Copy Deployment ID

Within seconds, Patr will make your application live.

To access your application from your browser, go to manage deployment and click on that create a deployment and copy the deployment-id in the URL.

And you have your deployment-ready!

Option 2: If your application does not have a backend, then follow this

Step 1: Deploy your App

You have already reached the first and final step here.

Run the command in your terminal.

npm run build

A build folder will be created in your application, now all we got to do is upload this folder! For that, go to Patr, and head over to Static sites.

Click on add new static site

Name your static site and drag and drop the build folder we just created and click on upload.

After this step, Patr will set everything up for you and your site will be live. And there you have it! Your brand spanking new site is up on the web.

With such an easy deployment process, you can focus more on what you’re building rather than getting caught up in some complicated and expensive setup.

--

--