Deploy to Koyeb button

Understand how to setup the Deploy to Koyeb button to provide one click deployments of your apps

The Deploy to Koyeb button helps users deploy applications from a GitHub repository or a Docker image with one single click. As a developer, it lets you create a fast deployment option for your users.

You can add the Deploy to Koyeb button to your documentation and readme files to allow your users to deploy your application with zero configuration.

The Deploy to Koyeb button can be configured to deploy public pre-built Docker images hosted on a container registry or GitHub repositories. When configured to deploy from a private Repository, the Koyeb user account must be linked with GitHub and have access to the repository.

Below is an example of the Deploy to Koyeb button that deploy a simple NestJS application on Koyeb from a public GitHub repository.

Deploy to Koyeb

Add the Deploy to Koyeb button

To add the Deploy to Koyeb button to your repository, you can use the following Markdown snippet as a template:

[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?...)

Parameters

The Deploy to Koyeb button configuration is passed using URL query parameters. Below is the list of arguments accepted by the button:

Common args

  • type (required): The deployment source to use. Can be git or docker, e.g. type=git.
  • name (required): The name of the application to deploy, e.g. name=my-app.
  • ports: A list of ports your application needs to expose. e.g. ports=8080;http;/ or for multiple ports ports=8080;http;/api&ports=8081;http;/.
  • env: A list of environment variables required to run the application. e.g. env[my-key]=my-value or for multiple environment variables env[my-key-1]=my-value-1&env[my-key-2]=my-value-2.

Git args

Parameters accepted when the button type is set to git:

  • repository (required): The repository to deploy from, e.g. repository=github.com/koyeb/example-nestjs.
  • branch (required): The branch to deploy from, e.g. branch=main.
  • run_command: The command to run to launch the application deploying, e.g. run_command=yarn start.
  • build_command: The command to run during the build of your application, e.g. build_command=yarn%build-command.

Docker args

Parameters accepted when the button type is set to docker:

  • image (required): The repository to deploy from, e.g. image=docker.io/koyeb/koyeb-demo:latest.
  • command: The command to pass to the container, e.g. command=/bin/sh.
  • args: The args to pass to the container, e.g. args=arg1&args=arg2.

Examples

Below are two examples of the minimal configuration of the Deploy to Koyeb button to:

  • Deploy from a public GitHub repository: https://app.koyeb.com/deploy?type=git&repository=github.com/koyeb/example-nestjs&branch=main&name=nestjs-on-koyeb
  • Deploy from a container registry: https://app.koyeb.com/deploy?type=docker&image=docker.io/koyeb/demo&name=koyeb-demo