From 091ac659ae51a6bf5b8c176ebefd0d71e9271b9d Mon Sep 17 00:00:00 2001 From: qs3c <2749950753@qq.com> Date: Thu, 5 Mar 2026 10:51:24 +0800 Subject: [PATCH] feat(docker): add Dokploy deployment template --- README.md | 9 +++++++ docker/dokploy/docker-compose.yml | 14 +++++++++++ docker/dokploy/template.toml | 41 +++++++++++++++++++++++++++++++ docs/DOKPLOY.md | 22 +++++++++++++++++ 4 files changed, 86 insertions(+) create mode 100644 docker/dokploy/docker-compose.yml create mode 100644 docker/dokploy/template.toml create mode 100644 docs/DOKPLOY.md diff --git a/README.md b/README.md index c1ef72141..56619dff8 100644 --- a/README.md +++ b/README.md @@ -211,6 +211,15 @@ docker compose -f docker/docker-compose.yml pull docker compose -f docker/docker-compose.yml --profile gateway up -d ``` +### Dokploy Template + +If you deploy PicoClaw on Dokploy, use the ready template files: + +- `docker/dokploy/docker-compose.yml` +- `docker/dokploy/template.toml` + +See [docs/DOKPLOY.md](docs/DOKPLOY.md) for details. + ### 🚀 Quick Start > [!TIP] diff --git a/docker/dokploy/docker-compose.yml b/docker/dokploy/docker-compose.yml new file mode 100644 index 000000000..6c31f297d --- /dev/null +++ b/docker/dokploy/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3.8" + +services: + picoclaw: + image: docker.io/sipeed/picoclaw:latest + restart: unless-stopped + environment: + TZ: ${TZ} + PICOCLAW_GATEWAY_HOST: ${PICOCLAW_GATEWAY_HOST} + volumes: + - picoclaw-workspace:/root/.picoclaw/workspace + +volumes: + picoclaw-workspace: {} diff --git a/docker/dokploy/template.toml b/docker/dokploy/template.toml new file mode 100644 index 000000000..7758deb0b --- /dev/null +++ b/docker/dokploy/template.toml @@ -0,0 +1,41 @@ +[variables] +main_domain = "${domain}" +openrouter_api_key = "${password:40}" + +[config] +env = [ + "TZ=UTC", + "PICOCLAW_GATEWAY_HOST=0.0.0.0", +] +mounts = [] + +[[config.domains]] +serviceName = "picoclaw" +port = 18_790 +host = "${main_domain}" + +[[config.mounts]] +filePath = "/root/.picoclaw/config.json" +content = """ +{ + "agents": { + "defaults": { + "workspace": "~/.picoclaw/workspace", + "restrict_to_workspace": true, + "model_name": "openrouter-default" + } + }, + "model_list": [ + { + "model_name": "openrouter-default", + "model": "openrouter/openai/gpt-4o-mini", + "api_key": "${openrouter_api_key}", + "api_base": "https://openrouter.ai/api/v1" + } + ], + "gateway": { + "host": "0.0.0.0", + "port": 18790 + } +} +""" diff --git a/docs/DOKPLOY.md b/docs/DOKPLOY.md new file mode 100644 index 000000000..6738738d4 --- /dev/null +++ b/docs/DOKPLOY.md @@ -0,0 +1,22 @@ +# Dokploy Deployment + +This repository includes a Dokploy-ready template under [docker/dokploy](../docker/dokploy). + +## Included Files + +- `docker/dokploy/docker-compose.yml`: runtime service definition +- `docker/dokploy/template.toml`: Dokploy template variables, domain mapping, and config mount + +## What This Template Provides + +- A persistent workspace volume at `/root/.picoclaw/workspace` +- Automatic gateway host binding to `0.0.0.0` +- A generated `config.json` mount with: + - model alias: `openrouter-default` + - model: `openrouter/openai/gpt-4o-mini` + - OpenRouter API key from template variable + +## Usage Notes + +- Set your domain and `openrouter_api_key` in Dokploy when deploying the template. +- If you prefer another provider/model, edit the mounted `config.json` content in `template.toml`.