[PR #1018] [MERGED] feat: add Dify template #16326

Closed
opened 2026-07-14 23:19:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/1018
Author: @Siumauricio
Created: 7/14/2026
Status: Merged
Merged: 7/14/2026
Merged by: @Siumauricio

Base: canaryHead: feat/dify


📝 Commits (1)

📊 Changes

5 files changed (+468 additions, -0 deletions)

View changed files

blueprints/dify/docker-compose.yml (+256 -0)
blueprints/dify/instructions.md (+15 -0)
blueprints/dify/logo.svg (+12 -0)
blueprints/dify/meta.json (+17 -0)
blueprints/dify/template.toml (+168 -0)

📄 Description

What

Adds a Dify 1.15.0 template (open-source LLM app development platform).

Closes #88

Architecture decisions

The upstream docker/docker-compose.yaml is huge (20+ services across profiles). This template ships the minimal functional stack, adapted for Dokploy:

Service Image Notes
nginx nginx:1.27-alpine Lightweight internal gateway replicating the upstream nginx path routing (/console/api, /api, /v1, /openapi, /files, /mcp, /triggers, /e/ -> plugin daemon, / -> web). Traefik terminates TLS and forwards everything to this single entrypoint.
api / worker / worker_beat langgenius/dify-api:1.15.0 Same env block shared through a YAML anchor, like upstream. Migrations run on first boot (2-4 min).
web langgenius/dify-web:1.15.0 Console / app frontend.
db pgvector/pgvector:pg16 Single PostgreSQL instance used for the main dify DB, the plugin daemon DB (dify_plugin, auto-created by the daemon) and as the vector store (VECTOR_STORE=pgvector, first-class supported by Dify). This removes the whole Weaviate container from the stack.
redis redis:6-alpine Cache + Celery broker, password-protected.
sandbox langgenius/dify-sandbox:0.2.15 Code execution sandbox (pinned to the upstream version).
ssrf_proxy ubuntu/squid:latest SSRF proxy for user-triggered outbound requests, with the upstream squid.conf.template rendered statically (no entrypoint hackery needed).
plugin_daemon langgenius/dify-plugin-daemon:0.6.3-local Required since Dify 1.0 — model providers/tools are marketplace plugins.

Other notes:

  • init_permissions (busybox) chowns the shared storage volume to uid 1001 once, mirroring the upstream init_permissions container (the dify-api image runs as non-root and setup fails with Permission denied otherwise).
  • Collaboration mode (api_websocket service + /socket.io) is disabled via ENABLE_COLLABORATION_MODE=false to keep the stack smaller.
  • All secrets (SECRET_KEY, DB/Redis passwords, sandbox key, plugin daemon keys) are generated by template helpers.

Evidence (deployed on a Dokploy instance)

  • Deploy: done, all 10 containers running.
  • GET / -> 200 (Dify web, redirects to the /install setup page).
  • GET /console/api/setup -> {"step":"not_started","setup_at":null}; after creating the admin through the API -> {"step":"finished",...}.
  • POST /console/api/setup (admin creation) -> {"result":"success"}, POST /console/api/login -> session cookies issued.
  • POST /console/api/apps -> chat app created successfully (DB roundtrip OK).
  • Marketplace plugin install E2E: POST /console/api/workspaces/current/plugin/install/marketplace with langgenius/openai:1.0.0 -> task success, plugin listed in /plugin/list and openai shows up in /model-providers (proves api -> plugin_daemon -> marketplace pipeline and the auto-created dify_plugin database all work).

Note: Dify 1.15 issues __Host-/Secure session cookies, so the console needs HTTPS on the domain — documented in the template's instructions.md.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/1018 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@Siumauricio](https://github.com/Siumauricio) **Base:** `canary` ← **Head:** `feat/dify` --- ### 📝 Commits (1) - [`1c2dea3`](https://github.com/Dokploy/templates/commit/1c2dea39c35548e417d918d9d56c4eec883c2eb1) feat: add Dify template ### 📊 Changes **5 files changed** (+468 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `blueprints/dify/docker-compose.yml` (+256 -0) ➕ `blueprints/dify/instructions.md` (+15 -0) ➕ `blueprints/dify/logo.svg` (+12 -0) ➕ `blueprints/dify/meta.json` (+17 -0) ➕ `blueprints/dify/template.toml` (+168 -0) </details> ### 📄 Description ## What Adds a **Dify 1.15.0** template (open-source LLM app development platform). Closes #88 ## Architecture decisions The upstream `docker/docker-compose.yaml` is huge (20+ services across profiles). This template ships the minimal functional stack, adapted for Dokploy: | Service | Image | Notes | |---|---|---| | `nginx` | `nginx:1.27-alpine` | Lightweight internal gateway replicating the upstream nginx path routing (`/console/api`, `/api`, `/v1`, `/openapi`, `/files`, `/mcp`, `/triggers`, `/e/` -> plugin daemon, `/` -> web). Traefik terminates TLS and forwards everything to this single entrypoint. | | `api` / `worker` / `worker_beat` | `langgenius/dify-api:1.15.0` | Same env block shared through a YAML anchor, like upstream. Migrations run on first boot (2-4 min). | | `web` | `langgenius/dify-web:1.15.0` | Console / app frontend. | | `db` | `pgvector/pgvector:pg16` | Single PostgreSQL instance used for the main `dify` DB, the plugin daemon DB (`dify_plugin`, auto-created by the daemon) **and** as the vector store (`VECTOR_STORE=pgvector`, first-class supported by Dify). This removes the whole Weaviate container from the stack. | | `redis` | `redis:6-alpine` | Cache + Celery broker, password-protected. | | `sandbox` | `langgenius/dify-sandbox:0.2.15` | Code execution sandbox (pinned to the upstream version). | | `ssrf_proxy` | `ubuntu/squid:latest` | SSRF proxy for user-triggered outbound requests, with the upstream `squid.conf.template` rendered statically (no entrypoint hackery needed). | | `plugin_daemon` | `langgenius/dify-plugin-daemon:0.6.3-local` | Required since Dify 1.0 — model providers/tools are marketplace plugins. | Other notes: - `init_permissions` (busybox) chowns the shared storage volume to uid 1001 once, mirroring the upstream `init_permissions` container (the dify-api image runs as non-root and setup fails with `Permission denied` otherwise). - Collaboration mode (`api_websocket` service + `/socket.io`) is disabled via `ENABLE_COLLABORATION_MODE=false` to keep the stack smaller. - All secrets (`SECRET_KEY`, DB/Redis passwords, sandbox key, plugin daemon keys) are generated by template helpers. ## Evidence (deployed on a Dokploy instance) - Deploy: `done`, all 10 containers running. - `GET /` -> 200 (Dify web, redirects to the `/install` setup page). - `GET /console/api/setup` -> `{"step":"not_started","setup_at":null}`; after creating the admin through the API -> `{"step":"finished",...}`. - `POST /console/api/setup` (admin creation) -> `{"result":"success"}`, `POST /console/api/login` -> session cookies issued. - `POST /console/api/apps` -> chat app created successfully (DB roundtrip OK). - **Marketplace plugin install E2E**: `POST /console/api/workspaces/current/plugin/install/marketplace` with `langgenius/openai:1.0.0` -> task `success`, plugin listed in `/plugin/list` and `openai` shows up in `/model-providers` (proves api -> plugin_daemon -> marketplace pipeline and the auto-created `dify_plugin` database all work). Note: Dify 1.15 issues `__Host-`/`Secure` session cookies, so the console needs HTTPS on the domain — documented in the template's `instructions.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:19:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16326