Skip to content

fcakyon/claude-codex-settings / plugins/dokploy-skills/skills/dokploy-deploy

dokploy-deploy

Flagged

This skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".

FileKindSize
SKILL.mdskill md3.6 KB
references/applications/advanced.mdxmarkdown13.8 KB
references/applications/build-type.mdxmarkdown9.0 KB
references/applications/going-production.mdxmarkdown7.0 KB
references/applications/index.mdxmarkdown4.3 KB
references/applications/meta.jsonconfig155 B
references/applications/preview-deployments.mdxmarkdown3.9 KB
references/applications/rollbacks.mdxmarkdown6.0 KB
references/applications/zero-downtime.mdxmarkdown2.9 KB
references/cli-commands.mdmarkdown34.3 KB
references/cloud/cloud.mdxmarkdown5.3 KB
references/databases/backups.mdxmarkdown1.3 KB
references/databases/connection/index.mdxmarkdown1.8 KB
references/databases/connection/mariadb.mdxmarkdown859 B
references/databases/connection/mongo-atlas.mdxmarkdown795 B
references/databases/connection/mysql.mdxmarkdown852 B
references/databases/connection/pg-admin.mdxmarkdown1020 B
references/databases/connection/redis.mdxmarkdown772 B
references/databases/index.mdxmarkdown4.3 KB
references/databases/restore.mdxmarkdown1.9 KB
references/docker-compose/domains.mdxmarkdown11.1 KB
references/docker-compose/example.mdxmarkdown4.1 KB
references/docker-compose/index.mdxmarkdown8.4 KB
references/docker-compose/utilities.mdxmarkdown2.6 KB
references/domains/cloudflare.mdxmarkdown6.5 KB
references/domains/generated.mdxmarkdown1.3 KB
references/domains/index.mdxmarkdown11.7 KB
references/domains/others.mdxmarkdown1.7 KB
references/getting-started/installation.mdxmarkdown8.9 KB
references/getting-started/manual-installation.mdxmarkdown16.8 KB
references/remote-servers/build-server.mdxmarkdown5.5 KB
references/remote-servers/deployments.mdxmarkdown1.4 KB
references/remote-servers/index.mdxmarkdown3.4 KB
references/remote-servers/instructions.mdxmarkdown4.4 KB
references/remote-servers/security.mdxmarkdown2.7 KB
references/remote-servers/validate.mdxmarkdown2.4 KB

references/applications/rollbacks.mdx

View on GitHub
---
title: Rollbacks
description: Learn how to rollback your application in Dokploy.
---

import { Callout } from 'fumadocs-ui/components/callout';

Rollbacks are a powerful feature that allows you to easily revert changes to your application. This is particularly useful when you encounter issues or want to revert to a previous version of your application.

## Types of Rollbacks

Dokploy supports two types of rollback mechanisms:

1. **Docker Swarm Rollbacks** (Automatic): Based on health checks, automatically reverts to the previous version if a deployment fails health checks
2. **Registry-based Rollbacks** (Manual): Uses Docker registry to store each deployment's image, allowing you to manually rollback to any specific deployment version

<Callout type="info">
  The rollback methods described in the first section of this guide are based on **Docker Swarm's automatic rollback feature**. Dokploy also supports **registry-based rollbacks** at the deployment level, which allows you to save each deployment's image to a registry and rollback to any specific version. See the "Rollback to a specific version" section below for more details.
</Callout>

## Requirements

1. Have a `/health` endpoint in your application.
2. Have `curl` available in your container (if you use alpine for example, it won't be installed by default).

## Docker Swarm Automatic Rollback

This method uses Docker Swarm's built-in rollback feature, which automatically reverts to the previous version if health checks fail during deployment.

<Callout type="info">
  This rollback method is **automatic** and based on Docker Swarm's health check system. It only works if the new deployment fails health checks, triggering an automatic rollback to the previous version.
</Callout>

### Steps to Configure Automatic Rollback

Let's suppose we have a NodeJS application that has a health check route `/health` that returns a 200 status code and running in the port 3000.

1. In your application is necessary to have a `Path` or `Health Route` to be able to achieve zero downtime deployments eg. in the case of a NodeJS app you can have a route `/health` that returns a 200 status code.
2. Go to `Advanced` Tab and go to Cluster Settings and enter to `Swarm Settings`
3. There are a couple options that you can use, in this case we will focus on `Health Check` and `Update Config`.
4. Paste this code in the health check field:
Make sure the API Route exists in your application

```json
{
  "Test": [
    "CMD",
    "curl",
    "-f",
    "http://localhost:3000/health"
  ],
  "Interval": 30000000000,
  "Timeout": 10000000000,
  "StartPeriod": 30000000000,
  "Retries": 3
}
```
5. Now in the `Update Config`

Now when the application is getting unhealthy response from the health check, the container will rollback to the previous version.

Paste the following code:
```json
{
  "Parallelism": 1,
  "Delay": 10000000000,
  "FailureAction": "rollback",
  "Order": "start-first"
}
```

## Registry-based Rollback to Specific Versions

The previous section covered Docker Swarm's automatic rollback feature, which only works when health checks fail. Dokploy also supports **registry-based rollbacks** at the deployment level, which provides more control and flexibility.

### How Registry-based Rollbacks Work

When using registry-based rollbacks, Dokploy:

- **Saves each deployment's image to your configured registry**: Every time you deploy, the built image is tagged and pushed to your Docker registry (Docker Hub, GHCR, etc.)
- **Associates each deployment with its image**: Each deployment record in Dokploy is linked to a specific image tag in your registry
- **Enables rollback to any deployment**: You can rollback to any previous deployment by using the image that was saved during that deployment

This approach is different from Docker Swarm rollbacks because:
- ✅ **Works with any deployment**: Not limited to health check failures
- ✅ **Rollback to any version**: Can rollback to any previous deployment, not just the immediate previous one
- ✅ **Uses registry storage**: Images are stored in your registry, making them persistent and accessible

<Callout type="info">
  Registry-based rollbacks require that your application is configured to use a Docker registry. The images are automatically pushed to your registry during each deployment, and Dokploy tracks which image corresponds to each deployment.
</Callout>

### Prerequisites for Registry-based Rollbacks

To use registry-based rollbacks, you need:

1. **A configured Docker registry** in Dokploy (Docker Hub, GHCR, or custom registry)
2. **Registry credentials** set up in Dokploy's registry settings
3. **Application configured to push images** to the registry during deployment

<Callout type="info">
  When you enable rollbacks, Dokploy will automatically push each deployment's image to your configured registry with a unique tag, allowing you to rollback to any specific deployment version.
</Callout>

### Enabling Registry-based Rollbacks

To start saving deployment images to your registry for rollbacks:

1. Navigate to your application
2. Go to **Deployments** → **Rollback Settings**
3. Enable the **Rollback** option
4. Select the registry you want to use for rollbacks
5. Click on **Save**

Once enabled, Dokploy will:
- **Automatically tag and push images**: Every deployment's image is tagged and pushed to your configured registry
- **Track deployment associations**: Each deployment is linked to its specific image tag in the registry
- **Enable rollback buttons**: You'll see a **Rollback** button next to each deployment in the Deployments section

### Performing a Registry-based Rollback

1. Go to your application's **Deployments** section
2. Find the deployment version you want to rollback to
3. Click the **Rollback** button next to that deployment
4. Confirm the rollback action

<Callout type="info">
  After clicking **Rollback**, you'll need to wait a few seconds for Dokploy to download the image from your registry. The container will not appear in the **Logs** tab immediately - wait a moment for the image download to complete before checking the logs to see the container running.
</Callout>

writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 321kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall