mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #175 from ephraimduncan/template/documenso
feat: add documenso as template
This commit is contained in:
BIN
public/templates/documenso.png
Normal file
BIN
public/templates/documenso.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.0 KiB |
@@ -1,4 +1,3 @@
|
|||||||
version: '3.8'
|
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:16-alpine
|
image: postgres:16-alpine
|
||||||
|
|||||||
53
templates/documenso/docker-compose.yml
Normal file
53
templates/documenso/docker-compose.yml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:16
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
volumes:
|
||||||
|
- documenso-data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_USER=documenso
|
||||||
|
- POSTGRES_PASSWORD=password
|
||||||
|
- POSTGRES_DB=documenso
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U documenso"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 10s
|
||||||
|
|
||||||
|
documenso:
|
||||||
|
image: documenso/documenso:1.5.6-rc.2
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
environment:
|
||||||
|
- PORT=${DOCUMENSO_PORT}
|
||||||
|
- NEXTAUTH_URL=http://${DOCUMENSO_HOST}
|
||||||
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
||||||
|
- NEXT_PRIVATE_ENCRYPTION_KEY=${NEXT_PRIVATE_ENCRYPTION_KEY}
|
||||||
|
- NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY}
|
||||||
|
- NEXT_PUBLIC_WEBAPP_URL=http://${DOCUMENSO_HOST}
|
||||||
|
- NEXT_PRIVATE_DATABASE_URL=postgres://documenso:password@postgres:5432/documenso
|
||||||
|
- NEXT_PRIVATE_DIRECT_DATABASE_URL=postgres://documenso:password@postgres:5432/documenso
|
||||||
|
- NEXT_PUBLIC_UPLOAD_TRANSPORT=database
|
||||||
|
- NEXT_PRIVATE_SMTP_TRANSPORT=smtp-auth
|
||||||
|
- NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH=/opt/documenso/cert.p12
|
||||||
|
ports:
|
||||||
|
- ${DOCUMENSO_PORT}
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.${HASH}.rule=Host(`${DOCUMENSO_HOST}`)"
|
||||||
|
- "traefik.http.services.${HASH}.loadbalancer.server.port=${DOCUMENSO_PORT}"
|
||||||
|
volumes:
|
||||||
|
- /opt/documenso/cert.p12:/opt/documenso/cert.p12
|
||||||
|
|
||||||
|
networks:
|
||||||
|
dokploy-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
documenso-data:
|
||||||
30
templates/documenso/index.ts
Normal file
30
templates/documenso/index.ts
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
import {
|
||||||
|
generateHash,
|
||||||
|
generateRandomDomain,
|
||||||
|
type Template,
|
||||||
|
type Schema,
|
||||||
|
generateBase64,
|
||||||
|
generatePassword,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
|
export function generate(schema: Schema): Template {
|
||||||
|
const mainServiceHash = generateHash(schema.projectName);
|
||||||
|
const randomDomain = generateRandomDomain(schema);
|
||||||
|
|
||||||
|
const nextAuthSecret = generateBase64(32);
|
||||||
|
const documensoEncryptionKey = generatePassword(32);
|
||||||
|
const documensoSecondaryEncryptionKey = generatePassword(64);
|
||||||
|
|
||||||
|
const envs = [
|
||||||
|
`DOCUMENSO_HOST=${randomDomain}`,
|
||||||
|
"DOCUMENSO_PORT=3000",
|
||||||
|
`HASH=${mainServiceHash}`,
|
||||||
|
`NEXTAUTH_SECRET=${nextAuthSecret}`,
|
||||||
|
`NEXT_PRIVATE_ENCRYPTION_KEY=${documensoEncryptionKey}`,
|
||||||
|
`NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=${documensoSecondaryEncryptionKey}`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
envs,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -34,7 +34,7 @@ export const templates: TemplateData[] = [
|
|||||||
{
|
{
|
||||||
id: "calcom",
|
id: "calcom",
|
||||||
name: "Calcom",
|
name: "Calcom",
|
||||||
version: "2.7.6",
|
version: "v2.7.6",
|
||||||
description:
|
description:
|
||||||
"Calcom is a open source alternative to Calendly that allows to create scheduling and booking services.",
|
"Calcom is a open source alternative to Calendly that allows to create scheduling and booking services.",
|
||||||
|
|
||||||
@@ -47,4 +47,20 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["scheduling", "booking"],
|
tags: ["scheduling", "booking"],
|
||||||
load: () => import("./calcom/index").then((m) => m.generate),
|
load: () => import("./calcom/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "documenso",
|
||||||
|
name: "Documenso",
|
||||||
|
version: "v1.5.6",
|
||||||
|
description:
|
||||||
|
"Documenso is the open source alternative to DocuSign for signing documents digitally",
|
||||||
|
|
||||||
|
links: {
|
||||||
|
github: "https://github.com/documenso/documenso",
|
||||||
|
website: "https://documenso.com/",
|
||||||
|
docs: "https://documenso.com/docs",
|
||||||
|
},
|
||||||
|
logo: "documenso.png",
|
||||||
|
tags: ["document-signing"],
|
||||||
|
load: () => import("./documenso/index").then((m) => m.generate),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user