Skip to main content

Create your own template (elestio.yml)

You can create your own template to be deployed on Elestio by yourself (private repo) or anyone (public repo). We recommend that you fork one of our sample repository as a base and modify it to meet your requirements: 

Samples repositories for the most popular stacks & frameworks (46 Frameworks & Runtimes)


To streamline the deployment process the application stack must be defined in elestio.yml, this file contain all details about the runtime, build/run commands, env vars, ports & reverse proxy.

Here is an example elestio.yml file about a docker-compose based stack (must be placed at the root of your repository)

config:
  runTime: "dockerCompose"
  version: ""
  framework: ""
  buildCommand: "docker-compose build"
  buildDir: "/"
  runCommand: "docker-compose up -d"
environments:
  - key: "SOFTWARE_VERSION_TAG"
    value: "latest"
  - key: "SOFTWARE_PASSWORD"
    value: "random_password"
  - key: "ADMIN_EMAIL"
    value: "[EMAIL]"
  - key: "ADMIN_PASSWORD"
    value: "random_password"
ports:
  - protocol: "HTTPS"
    targetProtocol: "HTTP"
    listeningPort: "443"
    targetPort: "8001"
    targetIP: "172.17.0.1"
    public: true
    path: "/"
    isAuth: true
    login: "root"
    password: "random_password"
  - protocol: "TCP"
    targetProtocol: "TCP"
    listeningPort: "26379"
    targetIP: "172.17.0.1"
    targetPort: "6379"
    public: true
lifeCycleConfig:
  preInstallCommand: "./scripts/preInstall.sh"
  postInstallCommand: "./scripts/postInstall.sh"
  preBackupCommand: "./scripts/preBackup.sh"
  postBackupCommand: "./scripts/postBackup.sh"
  preRestoreCommand: "./scripts/preRestore.sh"
  postRestoreCommand: "./scripts/postRestore.sh"
 
"config" section

Runtime: define the base runtime image used to build your app, possible values are: NodeJs, Java, PHP, Ruby, Python, .NET, GO, static, dockerCompose, docker

Version: define the version of the runtime image used to build your app, a list of available version is provided in the dropdown in our dashboard, you can find the corresponding values in docker hub.

Framework: based on the selected framework, our UI will auto populate build/run commands & output directory. This is optional.

buildCommand: indicate the command to execute to build your code.

runCommand: indicate the command to execute to run your code.

buildDir: indicate the directory where build output will be placed.


"environments" section

If your app require env vars for configuration, you can define them one by one in the section. For each env var you need to indicate the key and the value. Here is an example to define an env var named "DB_TYPE" and with value "postgres":

	- key: "DB_TYPE"
    value: "postgres"

Version:there defineis few variables that you can use in the version"value" field:

random_password: this will be replaced by a randomly generated password on deploy.

[EMAIL]: this will be replaced by the email address of the runtimeuser imagedeploying usedthe topipeline buildon yourdeploy.

app,

[CI_CD_DOMAIN]: athis listwill be replaced by the CNAME of available version is provided in the dropdownpipeline inon our dashboard, you can find the corresponding values in docker hub.deploy.