mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
feat(add): Twenty CRM
This commit is contained in:
parent
0708fa05b6
commit
2eeb4017ac
6
apps/dokploy/public/templates/twenty.svg
Normal file
6
apps/dokploy/public/templates/twenty.svg
Normal file
@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 40 40">
|
||||
<g id="ss11151339769_1">
|
||||
<path d="M 0 40 L 0 0 L 40 0 L 40 40 Z" fill="transparent"></path>
|
||||
<path d="M 34.95 0 L 5.05 0 C 2.262 0 0 2.262 0 5.05 L 0 34.95 C 0 37.738 2.262 40 5.05 40 L 34.95 40 C 37.738 40 40 37.738 40 34.95 L 40 5.05 C 40 2.262 37.738 0 34.95 0 Z M 8.021 14.894 C 8.021 12.709 9.794 10.935 11.979 10.935 L 19.6 10.935 C 19.712 10.935 19.815 11.003 19.862 11.106 C 19.909 11.209 19.888 11.329 19.812 11.415 L 18.141 13.229 C 17.85 13.544 17.441 13.726 17.012 13.726 L 12 13.726 C 11.344 13.726 10.812 14.259 10.812 14.915 L 10.812 17.909 C 10.812 18.294 10.5 18.606 10.115 18.606 L 8.721 18.606 C 8.335 18.606 8.024 18.294 8.024 17.909 L 8.024 14.894 Z M 31.729 25.106 C 31.729 27.291 29.956 29.065 27.771 29.065 L 24.532 29.065 C 22.347 29.065 20.574 27.291 20.574 25.106 L 20.574 19.438 C 20.574 19.053 20.718 18.682 20.979 18.397 L 22.868 16.347 C 22.947 16.262 23.071 16.232 23.182 16.274 C 23.291 16.318 23.365 16.421 23.365 16.538 L 23.365 25.088 C 23.365 25.744 23.897 26.276 24.553 26.276 L 27.753 26.276 C 28.409 26.276 28.941 25.744 28.941 25.088 L 28.941 14.915 C 28.941 14.259 28.409 13.726 27.753 13.726 L 24.032 13.726 C 23.606 13.726 23.2 13.906 22.909 14.218 L 11.812 26.276 L 18.479 26.276 C 18.865 26.276 19.176 26.588 19.176 26.974 L 19.176 28.368 C 19.176 28.753 18.865 29.065 18.479 29.065 L 9.494 29.065 C 8.679 29.065 8.018 28.403 8.018 27.588 L 8.018 26.85 C 8.018 26.479 8.156 26.124 8.409 25.85 L 20.85 12.335 C 21.674 11.441 22.829 10.935 24.044 10.935 L 27.768 10.935 C 29.953 10.935 31.726 12.709 31.726 14.894 L 31.726 25.106 Z" fill="rgb(0,0,0)"></path>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
@ -867,4 +867,19 @@ export const templates: TemplateData[] = [
|
||||
tags: ["support", "chat", "customer-service"],
|
||||
load: () => import("./chatwoot/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "twenty",
|
||||
name: "Twenty CRM",
|
||||
version: "latest",
|
||||
description:
|
||||
"Twenty is a modern CRM offering a powerful spreadsheet interface and open-source alternative to Salesforce.",
|
||||
logo: "twenty.svg",
|
||||
links: {
|
||||
github: "https://github.com/twentyhq/twenty",
|
||||
website: "https://twenty.com",
|
||||
docs: "https://docs.twenty.com",
|
||||
},
|
||||
tags: ["crm", "sales", "business"],
|
||||
load: () => import("./twenty/index.ts").then((m) => m.generate),
|
||||
},
|
||||
];
|
||||
|
98
apps/dokploy/templates/twenty/docker-compose.yml
Normal file
98
apps/dokploy/templates/twenty/docker-compose.yml
Normal file
@ -0,0 +1,98 @@
|
||||
version: "3.9"
|
||||
|
||||
services:
|
||||
twenty-change-vol-ownership:
|
||||
image: ubuntu
|
||||
user: root
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- twenty-server-local-data:/tmp/server-local-data
|
||||
- twenty-docker-data:/tmp/docker-data
|
||||
command: >
|
||||
bash -c "
|
||||
chown -R 1000:1000 /tmp/server-local-data
|
||||
&& chown -R 1000:1000 /tmp/docker-data"
|
||||
|
||||
twenty-server:
|
||||
image: twentycrm/twenty:latest
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- twenty-server-local-data:/app/packages/twenty-server/${STORAGE_LOCAL_PATH:-.local-storage}
|
||||
- twenty-docker-data:/app/docker-data
|
||||
environment:
|
||||
PORT: 3000
|
||||
PG_DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@twenty-db:5432/default
|
||||
SERVER_URL: https://${TWENTY_HOST}
|
||||
FRONT_BASE_URL: https://${TWENTY_HOST}
|
||||
REDIS_URL: redis://twenty-redis:6379
|
||||
ENABLE_DB_MIGRATIONS: "true"
|
||||
SIGN_IN_PREFILLED: "true"
|
||||
STORAGE_TYPE: local
|
||||
APP_SECRET: ${APP_SECRET}
|
||||
depends_on:
|
||||
twenty-change-vol-ownership:
|
||||
condition: service_completed_successfully
|
||||
twenty-db:
|
||||
condition: service_healthy
|
||||
healthcheck:
|
||||
test: curl --fail http://localhost:3000/healthz
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
restart: always
|
||||
|
||||
twenty-worker:
|
||||
image: twentycrm/twenty:latest
|
||||
networks:
|
||||
- dokploy-network
|
||||
command: ["yarn", "worker:prod"]
|
||||
environment:
|
||||
PG_DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@twenty-db:5432/default
|
||||
SERVER_URL: https://${TWENTY_HOST}
|
||||
FRONT_BASE_URL: https://${TWENTY_HOST}
|
||||
REDIS_URL: redis://twenty-redis:6379
|
||||
ENABLE_DB_MIGRATIONS: "false"
|
||||
STORAGE_TYPE: local
|
||||
APP_SECRET: ${APP_SECRET}
|
||||
depends_on:
|
||||
twenty-db:
|
||||
condition: service_healthy
|
||||
twenty-server:
|
||||
condition: service_healthy
|
||||
restart: always
|
||||
|
||||
twenty-db:
|
||||
image: twentycrm/twenty-postgres-spilo:latest
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- twenty-db-data:/home/postgres/pgdata
|
||||
environment:
|
||||
PGUSER_SUPERUSER: ${PGUSER}
|
||||
PGPASSWORD_SUPERUSER: ${PGPASSWORD}
|
||||
ALLOW_NOSSL: "true"
|
||||
SPILO_PROVIDER: "local"
|
||||
healthcheck:
|
||||
test: pg_isready -U ${PGUSER} -h localhost -d postgres
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
restart: always
|
||||
|
||||
twenty-redis:
|
||||
image: redis:latest
|
||||
networks:
|
||||
- dokploy-network
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
twenty-docker-data:
|
||||
twenty-db-data:
|
||||
twenty-server-local-data:
|
37
apps/dokploy/templates/twenty/index.ts
Normal file
37
apps/dokploy/templates/twenty/index.ts
Normal file
@ -0,0 +1,37 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const pgPassword = generatePassword();
|
||||
const pgUser = "twenty";
|
||||
const appSecret = generateBase64(32);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "twenty-server",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`TWENTY_HOST=${mainDomain}`,
|
||||
`PGUSER=${pgUser}`,
|
||||
`PGPASSWORD=${pgPassword}`,
|
||||
`APP_SECRET=${appSecret}`,
|
||||
"# Optional: Configure storage path",
|
||||
"# STORAGE_LOCAL_PATH=.local-storage",
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user