mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat: add draw.io template
This commit is contained in:
17
apps/dokploy/public/templates/drawio.svg
Normal file
17
apps/dokploy/public/templates/drawio.svg
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 161.6 161.6" style="enable-background:new 0 0 161.6 161.6;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#F08705;}
|
||||||
|
.st1{fill:#DF6C0C;}
|
||||||
|
.st2{fill:#FFFFFF;}
|
||||||
|
.st3{fill:#333333;}
|
||||||
|
</style>
|
||||||
|
<g>
|
||||||
|
<path class="st0" d="M161.6,154.7c0,3.9-3.2,6.9-6.9,6.9H6.9c-3.9,0-6.9-3.2-6.9-6.9V6.9C0,3,3.2,0,6.9,0h147.8 c3.9,0,6.9,3.2,6.9,6.9L161.6,154.7L161.6,154.7z"/>
|
||||||
|
<g>
|
||||||
|
<path class="st1" d="M161.6,154.7c0,3.9-3.2,6.9-6.9,6.9H55.3l-32.2-32.7l20-32.7l59.4-73.8l58.9,60.7L161.6,154.7z"/>
|
||||||
|
</g>
|
||||||
|
<path class="st2" d="M132.7,90.3h-17l-18-30.6c4-0.8,7-4.4,7-8.6V28c0-4.9-3.9-8.8-8.8-8.8h-30c-4.9,0-8.8,3.9-8.8,8.8v23.1 c0,4.3,3,7.8,6.9,8.6L46,90.4H29c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.9,3.9,8.8,8.8,8.8h30c4.9,0,8.8-3.9,8.8-8.8V99.2 c0-4.9-3.9-8.8-8.8-8.8h-2.9L73.9,60h13.9l17.9,30.4h-3c-4.9,0-8.8,3.9-8.8,8.8v23.1c0,4.9,3.9,8.8,8.8,8.8h30 c4.9,0,8.8-3.9,8.8-8.8V99.2C141.5,94.3,137.6,90.3,132.7,90.3z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
62
apps/dokploy/templates/drawio/docker-compose.yml
Normal file
62
apps/dokploy/templates/drawio/docker-compose.yml
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
version: '3'
|
||||||
|
services:
|
||||||
|
plantuml-server:
|
||||||
|
image: plantuml/plantuml-server
|
||||||
|
expose:
|
||||||
|
- "8080"
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
volumes:
|
||||||
|
- fonts_volume:/usr/share/fonts/drawio
|
||||||
|
image-export:
|
||||||
|
image: jgraph/export-server
|
||||||
|
expose:
|
||||||
|
- "8000"
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
volumes:
|
||||||
|
- fonts_volume:/usr/share/fonts/drawio
|
||||||
|
environment:
|
||||||
|
- DRAWIO_BASE_URL=${DRAWIO_BASE_URL}
|
||||||
|
drawio:
|
||||||
|
image: jgraph/drawio:24.7.17
|
||||||
|
ports:
|
||||||
|
- "8080"
|
||||||
|
links:
|
||||||
|
- plantuml-server:plantuml-server
|
||||||
|
- image-export:image-export
|
||||||
|
depends_on:
|
||||||
|
- plantuml-server
|
||||||
|
- image-export
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
environment:
|
||||||
|
RAWIO_SELF_CONTAINED: 1
|
||||||
|
DRAWIO_USE_HTTP: 1
|
||||||
|
PLANTUML_URL: http://plantuml-server:8080/
|
||||||
|
EXPORT_URL: http://image-export:8000/
|
||||||
|
DRAWIO_BASE_URL: ${DRAWIO_BASE_URL}
|
||||||
|
DRAWIO_SERVER_URL: ${DRAWIO_SERVER_URL}
|
||||||
|
DRAWIO_CSP_HEADER: ${DRAWIO_CSP_HEADER}
|
||||||
|
DRAWIO_VIEWER_URL: ${DRAWIO_VIEWER_URL}
|
||||||
|
DRAWIO_LIGHTBOX_URL: ${DRAWIO_LIGHTBOX_URL}
|
||||||
|
DRAWIO_CONFIG: ${DRAWIO_CONFIG}
|
||||||
|
DRAWIO_GOOGLE_CLIENT_ID: ${DRAWIO_GOOGLE_CLIENT_ID}
|
||||||
|
DRAWIO_GOOGLE_APP_ID: ${DRAWIO_GOOGLE_APP_ID}
|
||||||
|
DRAWIO_GOOGLE_CLIENT_SECRET: ${DRAWIO_GOOGLE_CLIENT_SECRET}
|
||||||
|
DRAWIO_GOOGLE_VIEWER_CLIENT_ID: ${DRAWIO_GOOGLE_VIEWER_CLIENT_ID}
|
||||||
|
DRAWIO_GOOGLE_VIEWER_APP_ID: ${DRAWIO_GOOGLE_VIEWER_APP_ID}
|
||||||
|
DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET: ${DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET}
|
||||||
|
DRAWIO_MSGRAPH_CLIENT_ID: ${DRAWIO_MSGRAPH_CLIENT_ID}
|
||||||
|
DRAWIO_MSGRAPH_CLIENT_SECRET: ${DRAWIO_MSGRAPH_CLIENT_SECRET}
|
||||||
|
DRAWIO_MSGRAPH_TENANT_ID: ${DRAWIO_MSGRAPH_TENANT_ID}
|
||||||
|
DRAWIO_GITLAB_ID: ${DRAWIO_GITLAB_ID}
|
||||||
|
DRAWIO_GITLAB_SECRET: ${DRAWIO_GITLAB_SECRET}
|
||||||
|
DRAWIO_GITLAB_URL: ${DRAWIO_GITLAB_URL}
|
||||||
|
DRAWIO_CLOUD_CONVERT_APIKEY: ${DRAWIO_CLOUD_CONVERT_APIKEY}
|
||||||
|
networks:
|
||||||
|
dokploy-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
fonts_volume:
|
||||||
31
apps/dokploy/templates/drawio/index.ts
Normal file
31
apps/dokploy/templates/drawio/index.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import {
|
||||||
|
type DomainSchema,
|
||||||
|
type Schema,
|
||||||
|
type Template,
|
||||||
|
generateBase64,
|
||||||
|
generateRandomDomain,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
|
export function generate(schema: Schema): Template {
|
||||||
|
const mainDomain = generateRandomDomain(schema);
|
||||||
|
const secretKeyBase = generateBase64(64);
|
||||||
|
|
||||||
|
const domains: DomainSchema[] = [
|
||||||
|
{
|
||||||
|
host: mainDomain,
|
||||||
|
port: 8080,
|
||||||
|
serviceName: "drawio",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const envs = [
|
||||||
|
`DRAWIO_HOST=${mainDomain}`,
|
||||||
|
`DRAWIO_BASE_URL=https://${mainDomain}`,
|
||||||
|
`DRAWIO_SERVER_URL=https://${mainDomain}/`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
domains,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -987,4 +987,19 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["event-driven", "applications"],
|
tags: ["event-driven", "applications"],
|
||||||
load: () => import("./triggerdotdev/index").then((m) => m.generate),
|
load: () => import("./triggerdotdev/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "drawio",
|
||||||
|
name: "draw.io",
|
||||||
|
version: "24.7.17",
|
||||||
|
description:
|
||||||
|
"draw.io is a configurable diagramming/whiteboarding visualization application.",
|
||||||
|
logo: "drawio.svg",
|
||||||
|
links: {
|
||||||
|
github: "https://github.com/jgraph/drawio",
|
||||||
|
website: "https://draw.io/",
|
||||||
|
docs: "https://www.drawio.com/doc/",
|
||||||
|
},
|
||||||
|
tags: ["drawing", "diagrams"],
|
||||||
|
load: () => import("./drawio/index").then((m) => m.generate),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user