Deploy examples & apps on Elestio using the “clone template” feature
Tags: opensource, elestio, clone, templates
Published: 2023-10-11 13:03:55

---
title: Deploy examples & apps on Elestio using the “clone template” feature
published: true
date: 2022-11-21 10:43:49 UTC
tags: opensource, elestio, clone, templates
canonical_url: https://elestio.hashnode.dev/deploy-examples-apps-on-elestio-using-the-clone-template-feature
---

This tutorial will show you how to use our clone template feature in CI/CD. Were going to use a Simple Javascript web application, but you can use any template and deploy it in the same way. 🚀

The clone template feature was similar to forking our [**_examples_**](https://github.com/elestio-examples?ref=blog.elest.io) from GITHUB and deploying it using an **_import git repository_** tab in Ci/CD, but using the **_clone template_** was easier because you didnt have to manually fork our template example and then deploy it using our import git repository tab. If you choose a template from the CI/CD clone template feature, Elestio will automatically create an example template repository in your git account and deploy it to the cloud. In this case, all you need to do is choose the template.

You probably heard about Kubernetes (and all its complexity) or various options to deploy your apps like Heroku, Render Fly, or Railways. They all have something in common, those products are building your own source code on every commit from your GIT repository.

Elestio is doing the same **but different!** Instead of deploying your app to a shared cluster, we deploy to dedicated VMs.

> _To learn more about the elestio CI/CD, go_ [**here**](https://docs.elest.io/books/cicd-pipelines/page/overview?ref=blog.elest.io).

If youre new, sign up for [_Elestio_](https://dash.elest.io/?ref=blog.elest.io), otherwise, login to your existing account.

#### Deploy Elestio apps to the cloud using the CI/CD Clone template feature.

#### Step 1:

Go to CI/CD from the left sidebar.

#### Step 2:

Now, select the deployment source.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005754155/d90a361e-565e-41fc-bcd0-44833e91188b.png)

In this tutorial, Im deploying using GITHUB, but you can also use GITLAB if you have a project there.

#### Step 3:

Select the Clone Template Tab.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005757925/4a207cad-4367-45ea-94f5-bfe68b542a05.png)

> **Here you can see the most interesting and well-liked tech stacks elestio templates.**

As Im deploying a Static Java Script Web Application, Ive chosen these, but you can adopt whatever you want.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005760537/31d80f05-bee9-4b22-8105-8018a3c1ad2a.png)

Now click the **_Select_** button to proceed.

> _If you have already authenticated your GITHUB or GITLAB account in CI/CD for repository access, you can fill up the below details directly. Otherwise, you must first authenticate your GIT account with elestio CI/CD for repository creation into your account._

We require GIT authentication in order to create these example template repositories in your GIT account.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005762133/2c46adce-d47e-4c47-bb40-90f4790af70e.png)

Here you can check the checkbox **_Create private Git Repository_** if you want to make these repo private otherwise leave it unchecked and click the **_Next button_** for further steps.

#### Step 4:

Choose Deployment Targets

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005764562/58723158-18ff-4d64-a796-04f577d7e46f.png)

Elestio offers two types of deployment targets **Deploy on a new VM** and **Deploy on an existing VM**.

You are allowed to set up n pipelines on each elestio CI/CD target/VM. According to the project configuration you select and the project youre deploying, the number of pipelines varies.

If you want to deploy these projects as a pipeline on a new Target/VM or dont have any installed targets, choose Deploy on a new VM. If you already have any installed or previously configured CI/CD targets/VMs, choose Deploy on an existing VM, and then choose the existing target from the targets dropdown.

Follow the steps below only if you select **Deploy on a new VM** , otherwise click the next button to proceed.

> _CI/CD Pipelines by Elestio are available with our 5 cloud partners (AWS Lightsail, Digital Ocean, Vultr, Linode & Hetzner) in 85 locations over 27 countries but also on any cloud (AWS, Azure, Google, Oracle, ) and on-premise with_ [_BYOVM._](https://doc.elest.io/books/cloud-providers/page/byovm-bring-your-own-vm?ref=blog.elest.io)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005766794/0c96de47-e3b7-4048-98ec-5ba371c44b7c.png)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005768408/22d00d61-eb3d-4b2f-ab23-9904738ad2bf.png)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005770058/5c8184c3-2b96-4265-85d5-c65e59cd81e8.png)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005771637/613e4c8e-b330-46ff-a277-b8611e76709d.png)

> _If you want to deploy it with a different name and a different project, you can customize it. By default, we configure it with a dynamic target name and the current project._

#### Step 5:

Configure your Project

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005773993/016b117b-1c5a-4e01-9b8e-4ace2c32ca3c.png)

You can configure the project details by filling up the project name, branch, run time, version, framework, and root directory.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005776081/969a2098-f02e-4052-b4b8-487ef0b17ad5.png)

You can configure your project install, run, and build commands in the Build and output setting.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005778361/89663fb1-eb1d-4d8d-8266-4b1f1cbb33f8.png)

The configuration of life cycle scripts is always optional; they should only be used if you want to execute a specific command before and after building your project. Otherwise, leave them empty.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005779939/3bc66ea7-8cf6-4c17-aadc-12eeb7506147.png)

You can list all of your projects API keys and secrets here if they were saved in ENV

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005781642/24fa8857-0e0c-4a95-b8ba-331de3d41c3e.png)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005783274/dddf67f9-d449-4e37-bef3-f52ddbd7cf1e.png)

The final step is to configure the exposed port and reverse proxy settings. You can specify the port on which your project will run here.

> _If your project includes_ **_elestio.yml_** \*, Elestio will auto-fill all of these fields. As in this tutorial, were using our Simple Javascript web application elestio example, so you can see in the above images that all of our fields are auto-filled.\*

Refer to these links to learn how to create our own [**_elestio.yml_**](https://docs.elest.io/books/cicd-pipelines/page/create-your-own-template-elestioyml?ref=blog.elest.io) for the project.

A sample elestio.yml for a Simple Javascript web application is shown below. check it out on [**_github_**](https://github.com/elestio-examples/static/blob/main/elestio.yml?ref=blog.elest.io)

```
config:
  runTime: "static"
  version: ""
  framework: ""
  buildCommand: ""
  buildDir: ""
  runCommand: ""
ports:
  - protocol: "HTTPS"
    targetProtocol: "HTTP"
    listeningPort: "443"
    targetPort: "3000"
    targetIP: "172.17.0.1"
    public: true
    path: "/"
    isAuth: false
    login: ""
    password: ""
exposedPorts:
  - protocol: "HTTP"
    hostPort: "3000"
    containerPort: "80"
    interface: "172.17.0.1"

```

#### Step 6:

Click the **_Create CI/CD pipeline_** button to deploy your pipeline.

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005784621/ea94b5c5-a5a7-49fa-b629-304ac9d4a838.png)

_In a couple of moments, your application was successfully deployed on elestio 🚀._

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005786239/ef19d757-7ad2-4319-96b7-2db2ccd325ac.png)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1697005787838/8e08d257-bfcd-4ac9-8d72-d49254687f6b.gif)

You can now view your deployed URL and access your application by going to desired application pipeline details.

Please let us know by contacting our support [**_email_**](mailto:support@elest.io) or [**_ticketing_**](https://dash.elest.io/support/creation?ref=blog.elest.io) system if you give it a shot and encounter any problems or if anything goes wrong.

Join us on [**_discord_**](https://discord.gg/4T4JGaMYrD?ref=blog.elest.io) to know more.

_Originally published at_ [_https://blog.elest.io_](https://blog.elest.io/deploy-examples-apps-on-elestio-using-the-clone-template-feature/) _on November 21, 2022._