What is an Application?
An application in Dokploy is a deployable service that runs as a Docker container. Dokploy handles the entire deployment lifecycle including:- Building from source code or Docker images
- Configuring runtime environment
- Managing domains and routing
- Monitoring and logging
- Automatic deployments from Git
Multiple Sources
Deploy from GitHub, GitLab, Bitbucket, Gitea, custom Git, Docker images, or by uploading files.
Build Methods
Support for Dockerfile, Nixpacks, Heroku buildpacks, Paketo buildpacks, and static sites.
Auto Deploy
Automatically deploy when you push code to your repository.
Preview Deployments
Create temporary deployments for pull requests to test changes before merging.
Application Lifecycle
Applications in Dokploy go through several stages:Application Status
- idle: Application is created but not deployed or has been stopped
- running: Build or deployment is in progress
- done: Application is successfully deployed and running
- error: Deployment failed or application crashed
Source Types
Dokploy supports multiple ways to deploy your applications:Git Providers
- GitHub
- GitLab
- Bitbucket
- Gitea
- Custom Git
Connect to GitHub repositories using OAuth or GitHub Apps. Supports:
- Automatic deployments on push or pull request
- Submodule support
- Branch protection
- Preview deployments for pull requests
Docker Images
Deploy pre-built Docker images from:- Docker Hub
- GitHub Container Registry (GHCR)
- Private registries
- Self-hosted registries
File Upload (Drop)
Upload a ZIP file containing your application code and deploy it directly:Build Types
Dokploy supports multiple build strategies:Dockerfile
Use an existing Dockerfile in your repository:Path to your Dockerfile relative to the build context
Docker build context path
Specific build stage to target in multi-stage builds
Nixpacks
Automatic detection and building using Nixpacks. No configuration needed for many common frameworks.Buildpacks
- Heroku Buildpacks
- Paketo Buildpacks
Use Heroku’s official buildpacks for automatic detection and building.
Specific Heroku stack version (e.g., heroku-22)
Static Sites
Deploy static websites with automatic web server configuration:Directory containing the built static files
Enable single-page application routing (redirects all routes to index.html)
Configuration
Environment Variables
Manage your application’s environment variables through the UI or API:Environment variables are inherited from the environment and project levels, with application-level variables taking precedence.
Build Arguments
Pass arguments to your Docker build:Build Secrets
Securely pass sensitive data during build time without exposing them in the final image:Resource Management
Control resource allocation for your applications:Minimum memory guaranteed for the container (e.g., “512m”, “1g”)
Maximum memory the container can use (e.g., “1g”, “2g”)
Minimum CPU guaranteed (e.g., “0.5”, “1.0”)
Maximum CPU the container can use (e.g., “1.0”, “2.0”)
Domains and Routing
Applications can have multiple domains configured for routing traffic. See Domains & Routing for detailed information.Quick Example
Deployments
Manual Deployment
Trigger a deployment manually through the UI or API:Automatic Deployment
Enable automatic deployments when code is pushed to your repository:Automatically deploy when changes are pushed to the configured branch
When to trigger deployments:
push or pull_requestWatch Paths
Optimize deployments by only triggering when specific paths change:Preview Deployments
Create temporary deployments for pull requests to test changes before merging:Enable preview deployments for pull requests
Maximum number of concurrent preview deployments
Require repository collaborator permissions to create preview deployments (security measure)
Preview Configuration
Preview deployments can have separate configuration:- previewEnv: Environment variables specific to preview deployments
- previewBuildArgs: Build arguments for preview builds
- previewWildcard: Domain pattern for preview deployments (e.g.,
*.preview.example.com) - previewPort: Port for preview applications
- previewPath: Base path for preview routing
Advanced Features
Ports
Expose additional ports from your application:Mounts
Persist data or inject configuration files:- Volume Mount
- File Mount
- Bind Mount
Redirects
Configure URL redirects for your application:Security
Add HTTP basic authentication to your application:Database Schema
Applications are stored with the following structure:Monitoring & Logs
Deployment Logs
View real-time logs during deployment:- Build output
- Error messages
- Deployment status
Runtime Logs
Access container logs after deployment:- stdout and stderr output
- Historical logs
- Real-time streaming
Resource Metrics
Monitor your application’s resource usage:- CPU usage
- Memory consumption
- Network traffic
Best Practices
Use Health Checks
Use Health Checks
Implement health check endpoints in your application to ensure Dokploy can properly monitor its status.
Set Resource Limits
Set Resource Limits
Always configure memory and CPU limits to prevent applications from consuming excessive resources.
Enable Auto Deploy Carefully
Enable Auto Deploy Carefully
Only enable automatic deployments for branches you trust. Consider using preview deployments for testing changes.
Separate Build and Runtime Secrets
Separate Build and Runtime Secrets
Use build secrets for build-time sensitive data and environment variables for runtime configuration.
Use Watch Paths
Use Watch Paths
Configure watch paths to avoid unnecessary deployments when unrelated files change.
Next Steps
Domains & Routing
Learn how to configure domains and routing for your applications
Databases
Add databases to your applications