Build and Deploy on Koyeb
Koyeb provides multiple ways to deploy your applications, giving you the flexibility to choose the deployment method that best fits your workflow. Whether you're working with a git repository, deploying from your local machine, or using pre-built Docker images, Koyeb has you covered.
Deployment methods
Koyeb supports three primary deployment methods:
Deploy from GitHub
Connect your GitHub repository to Koyeb for automated, git-driven deployments with built-in continuous deployment. Each time you push or merge changes to your production branch, Koyeb automatically builds and deploys your application.
Key features:
- Native continuous deployment
- Automatic builds on git push
- Support for both public and private repositories
- Available through the control panel (opens in a new tab) and Koyeb CLI
Learn more about deploying with GitHub
Deploy a Project Directory
Use the Koyeb CLI to deploy your application directly from your local project directory without requiring an intermediary git service or container registry.
Key features:
- Deploy directly from your machine
- No git repository required
- Ideal for rapid prototyping and testing
- Uses the same build process as git deployments
Learn more about deploying a project directory
Deploy Pre-built Docker Images
Deploy applications using Docker images from public or private container registries. This method gives you complete control over your build environment and allows you to integrate with your existing CI/CD pipeline.
Key features:
- Support for any Docker-compatible registry
- Private registry support with Secrets
- Full control over the build environment
- Override entrypoint, command, and arguments at deployment time
Learn more about deploying pre-built Docker images
Build methods
When deploying from GitHub or a project directory, Koyeb offers two build methods to transform your source code into a runnable container image:
Buildpack Builder
The buildpack builder uses cloud native buildpacks (opens in a new tab) to automatically detect your application's language and dependencies, then builds a container image without requiring a Dockerfile.
How it works:
- Analyzes your project files to detect the language and framework
- Installs required dependencies automatically
- Packages your application into an OCI-compliant container image
- Deploys the image to the Koyeb platform
Supported languages:
Customization options:
- Custom build commands (executed after automated build steps)
- Custom run commands or
Procfilesupport - Environment variables
- Work directory configuration for monorepos
Learn more about the buildpack build process
Dockerfile Builder
The Dockerfile builder uses a Dockerfile in your repository to build your application, giving you complete control over dependencies, build steps, and the runtime environment.
How it works:
- Locates the
Dockerfilein your repository (configurable path) - Executes the Docker build process using standard Docker tools
- Produces an OCI-compliant container image
- Deploys the image to the Koyeb platform
Customization options:
- Custom Dockerfile location
- Multi-stage build support with target stage selection
- Override entrypoint, command, and arguments
- Environment variables
- Work directory configuration for monorepos
Learn more about the Dockerfile build process
Additional features
Private Container Registries
Deploy images from private registries by creating Secrets with your registry credentials. Koyeb supports:
- Azure Container Registry (ACR)
- DockerHub private repositories
- DigitalOcean Container Registry
- GCP Container Registry
- GitHub Container Registry (ghcr.io)
- GitLab Container Registry
- Any Docker-compatible registry
Learn more about private container registry secrets
Configuration files
Koyeb supports various configuration approaches:
- Procfile: Define your application's run command in a
Procfileat your repository root - Environment variables: Configure application settings through environment variables
- Work directories: Deploy from subdirectories for monorepo support
Learn more about configuration files
Learn more about monorepo deployments
Build logs
Every git-driven deployment generates build logs that help you understand the build process and troubleshoot issues. Build logs are stored for 30 days and can be accessed through the control panel (opens in a new tab) or the Koyeb CLI.
Testing builds locally
For buildpack-based deployments, you can reproduce the build process locally using the pack CLI. This is useful for troubleshooting and testing before pushing to production.
pack build -B koyeb/builder <YOUR_IMAGE_NAME>Learn more about testing builds locally
Next steps
Ready to deploy your application? Choose the deployment method that works best for you:
- For continuous deployment from git: Deploy with GitHub
- For quick local testing: Deploy a Project Directory
- For pre-built images: Deploy Pre-built Docker Images