mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #731 from DrMxrcy/feat/chatwoot-template
Add: Chatwoot Template
This commit is contained in:
3
apps/dokploy/public/templates/chatwoot.svg
Normal file
3
apps/dokploy/public/templates/chatwoot.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="undefined" height="undefined" viewBox="0 0 24 24">
|
||||
<path fill="#0ea5e9" d="M0 12c0 6.629 5.371 12 12 12s12-5.371 12-12S18.629 0 12 0S0 5.371 0 12m17.008 5.29H11.44a5.57 5.57 0 0 1-5.562-5.567A5.57 5.57 0 0 1 11.44 6.16a5.57 5.57 0 0 1 5.567 5.563Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 306 B |
76
apps/dokploy/templates/chatwoot/docker-compose.yml
Normal file
76
apps/dokploy/templates/chatwoot/docker-compose.yml
Normal file
@@ -0,0 +1,76 @@
|
||||
version: '3'
|
||||
|
||||
x-base-config: &base-config
|
||||
image: chatwoot/chatwoot:v3.14.1
|
||||
volumes:
|
||||
- chatwoot-storage:/app/storage
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
- FRONTEND_URL=${FRONTEND_URL}
|
||||
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
||||
- RAILS_ENV=${RAILS_ENV}
|
||||
- NODE_ENV=${NODE_ENV}
|
||||
- INSTALLATION_ENV=${INSTALLATION_ENV}
|
||||
- RAILS_LOG_TO_STDOUT=${RAILS_LOG_TO_STDOUT}
|
||||
- LOG_LEVEL=${LOG_LEVEL}
|
||||
- DEFAULT_LOCALE=${DEFAULT_LOCALE}
|
||||
- POSTGRES_HOST=${POSTGRES_HOST}
|
||||
- POSTGRES_PORT=${POSTGRES_PORT}
|
||||
- POSTGRES_DATABASE=${POSTGRES_DATABASE}
|
||||
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
- REDIS_URL=${REDIS_URL}
|
||||
- ENABLE_ACCOUNT_SIGNUP=${ENABLE_ACCOUNT_SIGNUP}
|
||||
- ACTIVE_STORAGE_SERVICE=${ACTIVE_STORAGE_SERVICE}
|
||||
|
||||
services:
|
||||
chatwoot-rails:
|
||||
<<: *base-config
|
||||
depends_on:
|
||||
chatwoot-postgres:
|
||||
condition: service_started
|
||||
chatwoot-redis:
|
||||
condition: service_started
|
||||
entrypoint: docker/entrypoints/rails.sh
|
||||
command: ['bundle', 'exec', 'sh', '-c', 'rails db:chatwoot_prepare && rails s -p 3000 -b 0.0.0.0']
|
||||
restart: always
|
||||
|
||||
chatwoot-sidekiq:
|
||||
<<: *base-config
|
||||
depends_on:
|
||||
chatwoot-postgres:
|
||||
condition: service_started
|
||||
chatwoot-redis:
|
||||
condition: service_started
|
||||
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
||||
restart: always
|
||||
|
||||
chatwoot-postgres:
|
||||
image: postgres:12
|
||||
restart: always
|
||||
volumes:
|
||||
- chatwoot-postgres-data:/var/lib/postgresql/data
|
||||
networks:
|
||||
- dokploy-network
|
||||
environment:
|
||||
- POSTGRES_DB=${POSTGRES_DATABASE}
|
||||
- POSTGRES_USER=${POSTGRES_USERNAME}
|
||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||
|
||||
chatwoot-redis:
|
||||
image: redis:alpine
|
||||
restart: always
|
||||
volumes:
|
||||
- chatwoot-redis-data:/data
|
||||
networks:
|
||||
- dokploy-network
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
chatwoot-storage:
|
||||
chatwoot-postgres-data:
|
||||
chatwoot-redis-data:
|
||||
46
apps/dokploy/templates/chatwoot/index.ts
Normal file
46
apps/dokploy/templates/chatwoot/index.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const secretKeyBase = generateBase64(64);
|
||||
const postgresPassword = generatePassword();
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "chatwoot-rails",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`FRONTEND_URL=http://${mainDomain}`,
|
||||
`SECRET_KEY_BASE=${secretKeyBase}`,
|
||||
"RAILS_ENV=production",
|
||||
"NODE_ENV=production",
|
||||
"INSTALLATION_ENV=docker",
|
||||
"RAILS_LOG_TO_STDOUT=true",
|
||||
"LOG_LEVEL=info",
|
||||
"DEFAULT_LOCALE=en",
|
||||
"POSTGRES_HOST=chatwoot-postgres",
|
||||
"POSTGRES_PORT=5432",
|
||||
"POSTGRES_DATABASE=chatwoot",
|
||||
"POSTGRES_USERNAME=postgres",
|
||||
`POSTGRES_PASSWORD=${postgresPassword}`,
|
||||
"REDIS_URL=redis://chatwoot-redis:6379",
|
||||
"ENABLE_ACCOUNT_SIGNUP=false",
|
||||
"ACTIVE_STORAGE_SERVICE=local",
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
@@ -837,4 +837,19 @@ export const templates: TemplateData[] = [
|
||||
tags: ["3d", "rendering", "animation"],
|
||||
load: () => import("./blender/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "chatwoot",
|
||||
name: "Chatwoot",
|
||||
version: "v3.14.1",
|
||||
description:
|
||||
"Open-source customer engagement platform that provides a shared inbox for teams, live chat, and omnichannel support.",
|
||||
logo: "chatwoot.svg",
|
||||
links: {
|
||||
github: "https://github.com/chatwoot/chatwoot",
|
||||
website: "https://www.chatwoot.com",
|
||||
docs: "https://www.chatwoot.com/docs",
|
||||
},
|
||||
tags: ["support", "chat", "customer-service"],
|
||||
load: () => import("./chatwoot/index").then((m) => m.generate),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user