Skip to content

Dokploy Deployer

Actions

About

Trigger a deployment on Dokploy, either for an application or a compose project using direct IDs
v1
Latest
Star (1)

Tags

 (1)

Dokploy Deployer Action

A GitHub Action that triggers deployments on Dokploy and optionally polls for deployment status completion.

Features

  • ✅ Deploy applications and compose projects on Dokploy using direct IDs
  • 🔄 Optional polling for deployment status using deployment tracking APIs
  • ⏱️ Configurable polling intervals and timeouts
  • 📊 Detailed status reporting with deployment IDs and logs

Usage

Basic Usage (Fire and Forget)

- name: Deploy to Dokploy
  uses: thinesjs/dokploy-deployer-action@v1
  with:
      dokploy_url: ${{ secrets.DOKPLOY_URL }}
      api_key: ${{ secrets.DOKPLOY_API_KEY }}
      type: application
      application_id: ${{ secrets.DOKPLOY_APPLICATION_ID }}

With Deployment Status Polling

Tip: Github Actions workflow completion is dependent on the wait_for_deployment input. If you set it to true, the workflow will wait for the deployment to complete before marking the job as complete. If you set it to false, the workflow will mark the job as complete as soon as the deployment is triggered.

- name: Deploy Application by ID
  uses: thinesjs/dokploy-deployer-action@v1
  with:
      dokploy_url: ${{ secrets.DOKPLOY_URL }}
      api_key: ${{ secrets.DOKPLOY_API_KEY }}
      type: application
      application_id: ${{ secrets.DOKPLOY_APPLICATION_ID }}
      wait_for_deployment: true

Compose Deployment

- name: Deploy Compose Project
  uses: thinesjs/dokploy-deployer-action@v1
  with:
      dokploy_url: ${{ secrets.DOKPLOY_URL }}
      api_key: ${{ secrets.DOKPLOY_API_KEY }}
      type: compose
      compose_id: ${{ secrets.DOKPLOY_COMPOSE_ID }}
      wait_for_deployment: true

Inputs

Input Description Required Default
dokploy_url Dokploy base URL with API access ✅ -
api_key Dokploy API key ✅ -
type Deployment type (application or compose) ❌ application
application_id Dokploy application ID ❌ ""
compose_id Dokploy compose ID ❌ ""
wait_for_deployment Wait for deployment completion ❌ false
deployment_check_interval Status check interval in seconds ❌ 2
deployment_timeout Max deployment wait time in seconds ❌ 120
max_retries Max retries for failed API calls ❌ 5

Outputs

Output Description
deployment_status Final deployment status (when wait_for_deployment is enabled)

Status Values

When wait_for_deployment is enabled, the deployment_status output will contain one of:

  • done - Deployment completed successfully
  • error - Deployment failed
  • timeout - Polling timed out before completion

Secrets Setup

Required Secrets

Add these secrets to your GitHub repository (Settings → Secrets and variables → Actions):

Secret Name Description Example
DOKPLOY_URL Your Dokploy instance URL https://your-dokploy.example.com
DOKPLOY_API_KEY API key from Dokploy dashboard xxxxxxxxxxxxxxxxxxxxxx
DOKPLOY_APPLICATION_ID Application ID from Dokploy xxxxxxxxxxxxxxxxxxxxxx
DOKPLOY_COMPOSE_ID Compose ID from Dokploy (if using compose) xxxxxxxxxxxxxxxxxxxxxx

Getting Your Dokploy Credentials

  1. API Key: Go to your Dokploy dashboard → Account → Profile → API/CLI Keys
  2. Application/Compose ID: Go to your project → Select your app → Copy the ID from the URL (e.g. https://your-dokploy.example.com/dashboard/project/<project-id>/services/application/<application-id>?tab=general)
  3. Dokploy URL: Your Dokploy instance base URL (without /api suffix or trailing slash)

API Rate Limits

When using wait_for_deployment: true, the action polls the Dokploy API repeatedly to check deployment status. Ensure your API key has sufficient rate limits:

  • Polling frequency: Every 30 seconds by default (configurable via deployment_check_interval)
  • Duration: Up to 20 minutes by default (configurable via deployment_timeout)
  • Total API calls: ~40 calls per deployment (20 min ÷ 30 sec)
  • Failed retries: Up to 5 additional calls per failure (configurable via max_retries)

If you encounter rate limiting issues:

  • Increase deployment_check_interval (e.g., to 60 seconds)
  • Check your Dokploy instance API rate limit settings
  • Consider using wait_for_deployment: false for fire-and-forget deployments

Examples

Complete CI/CD Pipeline

name: Deploy to Dokploy

on:
    push:
        branches: [master]

jobs:
    deploy:
        runs-on: ubuntu-latest

        steps:
            - name: Deploy Application
              id: deploy
              uses: thinesjs/dokploy-deployer-action@v1
              with:
                  dokploy_url: ${{ secrets.DOKPLOY_URL }}
                  api_key: ${{ secrets.DOKPLOY_API_KEY }}
                  type: application
                  application_id: ${{ secrets.DOKPLOY_APPLICATION_ID }}
                  wait_for_deployment: true
                  deployment_check_interval: 2
                  deployment_timeout: 120

Parallel Deployments

jobs:
    deploy:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                environment: [staging, production]
        steps:
            - name: Deploy to ${{ matrix.environment }}
              uses: thinesjs/dokploy-deployer-action@v1
              with:
                  dokploy_url: ${{ secrets.DOKPLOY_URL }}
                  api_key: ${{ secrets.DOKPLOY_API_KEY }}
                  type: application
                  application_id: ${{ secrets[format('DOKPLOY_APPLICATION_ID_{0}', matrix.environment)] }}
                  wait_for_deployment: true

Error Handling

The action will:

  • ✅ Validate inputs before deployment
  • 🔄 Retry API calls on network failures (when polling)
  • ⏰ Timeout gracefully if deployment takes too long
  • 📋 Provide detailed logs for troubleshooting
  • ❌ Exit with non-zero code on deployment failures

Requirements

  • Dokploy instance with API access
  • Valid API key with deployment permissions

License

MIT License - see LICENSE file for details.

Dokploy Deployer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Trigger a deployment on Dokploy, either for an application or a compose project using direct IDs
v1
Latest

Tags

 (1)

Dokploy Deployer is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.