mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(templates): add excalidraw
This commit is contained in:
17
templates/excalidraw/docker-compose.yml
Normal file
17
templates/excalidraw/docker-compose.yml
Normal file
@@ -0,0 +1,17 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
excalidraw:
|
||||
networks:
|
||||
- dokploy-network
|
||||
image: excalidraw/excalidraw:latest
|
||||
ports:
|
||||
- ${EXCALIDRAW_PORT}
|
||||
labels:
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.${HASH}.rule=Host(`${EXCALIDRAW_HOST}`)
|
||||
- traefik.http.services.${HASH}.loadbalancer.server.port=${EXCALIDRAW_PORT}
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
20
templates/excalidraw/index.ts
Normal file
20
templates/excalidraw/index.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import {
|
||||
generateHash,
|
||||
generateRandomDomain,
|
||||
type Template,
|
||||
type Schema,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainServiceHash = generateHash(schema.projectName);
|
||||
const randomDomain = generateRandomDomain(schema);
|
||||
const envs = [
|
||||
`EXCALIDRAW_HOST=${randomDomain}`,
|
||||
"EXCALIDRAW_PORT=80",
|
||||
`HASH=${mainServiceHash}`,
|
||||
];
|
||||
|
||||
return {
|
||||
envs,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user