Dokploy Internal Oneshotのロゴ

Dokploy Internal Oneshot

コミュニティ
Innei
dokploy-internal-oneshot

データ移行、バッチ処理、スキーマ設定、臨時のpsqlスクリプトなど、Dokployプロジェクトの内部ネットワーク上にある他のサービスに接続する必要がある、一時的な単発タスクを実行する場合に使います。対象サービスをパブリックインターネットに公開せず、プロジェクトのDockerオーバーレイネットワークに接続して、処理完了後に終了させます。dokploy-api-cliと併用します。

Add to TypingMind

概要

公開者Innei
リポジトリSKILL
スキル名dokploy-internal-oneshot
スター
81
フォーク
2
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    InneiがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Dokploy Internal Oneshot」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/Innei/SKILL/tree/main/skills/infrastructure/dokploy-internal-oneshot
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Innei/SKILL.git /tmp/SKILL
mkdir -p .claude/skills
cp -r /tmp/SKILL/skills/infrastructure/dokploy-internal-oneshot .claude/skills/dokploy-internal-oneshot
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDokploy Internal Oneshotを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDokploy Internal Oneshotを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Dokploy Internal Oneshotは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Dokploy One-Shot Internal Task

When you need to run something inside a Dokploy project's network — to reach postgres, mongo, redis, etc. by their internal hostnames without temporarily exposing host ports — create a short-lived compose service with sourceType: "raw" and an inline YAML.

When to use

  • Running a one-time data migration script that needs the project's database
  • Triggering a batch job (cleanup, recompute, reindex) inside the same network
  • Quick psql / redis-cli ad-hoc scripts when a log API isn't needed
  • Anything where exposing externalPort on a database is undesirable

When NOT to use

  • Long-running services (use a normal application or compose with persistent intent)
  • Tasks that need only the public-facing API (just curl it)
  • Tasks where you have SSH on the host and prefer docker run --network <net> directly

Compose template

yaml
services:
  runner:
    image: <base-image-with-the-runtime-you-need>   # e.g. node:22-bookworm, python:3.12-slim
    working_dir: /app
    restart: "no"          # one-shot — must not auto-restart
    environment:
      # Internal service hostnames are the auto-generated `appName` of each service.
      # Discover via `GET /api/<svc>.one`.
      DB_URL: "postgres://user:pwd@<pg-appName>:5432/dbname"
      MODE: "dry-run"
    command:
      - bash
      - -c
      - |
        set -e
        # apt-get -q install whatever you need
        # git clone --depth 1 -b master https://github.com/<owner>/<repo>.git /app
        # corepack enable && pnpm install --frozen-lockfile
        echo "==== task start (mode=$$MODE) ===="
        # actual work goes here, e.g.
        #   pnpm exec tsx scripts/migrate.ts --mode "$$MODE"
        echo "==== task end ===="
networks:
  default:
    name: dokploy-network    # Dokploy's default project overlay
    external: true

Critical: escape $ as $$

Docker Compose performs variable interpolation on the command: block before bash sees it. Any $VAR will be substituted from the compose process's env, not the container's, and ${ARRAY[idx]} produces the dreaded:

invalid interpolation format for services.<svc>.command.[].
You may need to escape any $ with another $.

Rule: every $ that bash should see must be written $$ in the YAML. Validate locally with docker compose -f compose.yml config before uploading.

YAML you writeWhat bash seesUse case
$$VAR$VARenv var
$$(cmd)$(cmd)command substitution
$${arr[0]}${arr[0]}array index, PIPESTATUS

Driving it

Use the dokploy-api-cli skill for compose.create → compose.update (with the YAML) → compose.deploy. Then poll the container, not the deployment status:

bash
curl -sS -H "x-api-key: $TOKEN" \
  "https://$HOST/api/docker.getContainersByAppNameMatch?appName=$APP_NAME" \
  | jq '.[0] | "\(.state)|\(.status)"'
# wait for state to flip from running → exited

When the container exits, the exit code is in the status text (Exited (0) / Exited (1) …).

Reading output

The compose YAML you uploaded is the source of truth for the run. There is no public log API on Dokploy. Three options to retrieve output:

  1. Sidechannel-write into a database the runner can reach. See the capture-output-via-sidechannel skill. This is usually the cleanest for migrations because you'll have a database open anyway.
  2. SSH to the swarm host and docker logs <container> (works for the agent if SSH is available; not for users without host access).
  3. Have the runner POST a summary to a public webhook (webhook.site, ntfy.sh, your own endpoint). Useful when neither DB nor SSH is available.

Cleanup

After the task finishes:

  1. compose.delete removes the service AND its containers (no leftover exited container).
  2. If you want to re-run with updated YAML in the same composeId, first ssh host docker rm -f <appName>-<service>-1 because Dokploy's internal docker compose up won't recreate an existing exited container by default.

Common Mistakes

MistakeFix
Writing $VAR in command:Use $$VAR. Validate with docker compose config.
Using ${PIPESTATUS[0]} directlyWrite $${PIPESTATUS[0]}.
Leaving exited container in place between runsdocker rm -f <name> (via SSH) or compose.delete + compose.create again.
Counting on restart: "no" to mean "no retry on Dokploy redeploy"Dokploy will still re-create the container on each compose.deploy. The flag only stops Docker itself from restarting after exit.
Hostname uses friendly nameUse the auto-generated appName (e.g. mx-space-pg-7pacdz); friendly name doesn't resolve.

よくある質問

AIスキル「Dokploy Internal Oneshot」では何ができますか?

データ移行、バッチ処理、スキーマ設定、臨時のpsqlスクリプトなど、Dokployプロジェクトの内部ネットワーク上にある他のサービスに接続する必要がある、一時的な単発タスクを実行する場合に使います。対象サービスをパブリックインターネットに公開せず、プロジェクトのDockerオーバーレイネットワークに接続して、処理完了後に終了させます。dokploy-api-cliと併用します。

TypingMindでDokploy Internal Oneshotを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Dokploy Internal Oneshotはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDokploy Internal Oneshotをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/Innei/SKILL/tree/main/skills/infrastructure/dokploy-internal-oneshotを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Dokploy Internal Oneshotを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Dokploy Internal Oneshotで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDokploy Internal Oneshotを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Dokploy Internal Oneshot」は無料ですか?

InneiがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇