mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Add: Chatwoot
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 |
117
apps/dokploy/templates/chatwoot/docker-compose.yml
Normal file
117
apps/dokploy/templates/chatwoot/docker-compose.yml
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
base: &base
|
||||||
|
image: chatwoot/chatwoot:v3.14.1
|
||||||
|
volumes:
|
||||||
|
- storage_data:/app/storage
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
|
||||||
|
rails:
|
||||||
|
<<: *base
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
- RAILS_ENV=production
|
||||||
|
- INSTALLATION_ENV=docker
|
||||||
|
- FRONTEND_URL=https://${CHATWOOT_HOST}
|
||||||
|
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
||||||
|
- POSTGRES_HOST=postgres
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- POSTGRES_DATABASE=chatwoot_production
|
||||||
|
- REDIS_URL=redis://redis:6379
|
||||||
|
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||||
|
- ENABLE_ACCOUNT_SIGNUP=false
|
||||||
|
- MAILER_SENDER_EMAIL=Chatwoot <no-reply@${CHATWOOT_HOST}>
|
||||||
|
- FORCE_SSL=true
|
||||||
|
- RAILS_LOG_TO_STDOUT=true
|
||||||
|
- LOG_LEVEL=info
|
||||||
|
- LOG_SIZE=500
|
||||||
|
- RAILS_MAX_THREADS=5
|
||||||
|
- SMTP_DOMAIN=${CHATWOOT_HOST}
|
||||||
|
- SMTP_ADDRESS=${SMTP_ADDRESS}
|
||||||
|
- SMTP_PORT=${SMTP_PORT}
|
||||||
|
- SMTP_USERNAME=${SMTP_USERNAME}
|
||||||
|
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||||
|
- SMTP_AUTHENTICATION=plain
|
||||||
|
- SMTP_ENABLE_STARTTLS_AUTO=true
|
||||||
|
entrypoint: docker/entrypoints/rails.sh
|
||||||
|
command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
sidekiq:
|
||||||
|
<<: *base
|
||||||
|
depends_on:
|
||||||
|
postgres:
|
||||||
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
|
environment:
|
||||||
|
- NODE_ENV=production
|
||||||
|
- RAILS_ENV=production
|
||||||
|
- INSTALLATION_ENV=docker
|
||||||
|
- FRONTEND_URL=https://${CHATWOOT_HOST}
|
||||||
|
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
||||||
|
- POSTGRES_HOST=postgres
|
||||||
|
- POSTGRES_USERNAME=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- POSTGRES_DATABASE=chatwoot_production
|
||||||
|
- REDIS_URL=redis://redis:6379
|
||||||
|
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||||
|
- FORCE_SSL=true
|
||||||
|
- RAILS_LOG_TO_STDOUT=true
|
||||||
|
- LOG_LEVEL=info
|
||||||
|
- LOG_SIZE=500
|
||||||
|
- RAILS_MAX_THREADS=5
|
||||||
|
- SMTP_DOMAIN=${CHATWOOT_HOST}
|
||||||
|
- SMTP_ADDRESS=${SMTP_ADDRESS}
|
||||||
|
- SMTP_PORT=${SMTP_PORT}
|
||||||
|
- SMTP_USERNAME=${SMTP_USERNAME}
|
||||||
|
- SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||||
|
- SMTP_AUTHENTICATION=plain
|
||||||
|
- SMTP_ENABLE_STARTTLS_AUTO=true
|
||||||
|
- MAILER_SENDER_EMAIL=Chatwoot <no-reply@${CHATWOOT_HOST}>
|
||||||
|
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
volumes:
|
||||||
|
- postgres_data:/var/lib/postgresql/data
|
||||||
|
environment:
|
||||||
|
- POSTGRES_DB=chatwoot_production
|
||||||
|
- POSTGRES_USER=${POSTGRES_USERNAME}
|
||||||
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USERNAME}"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
redis:
|
||||||
|
image: redis:alpine
|
||||||
|
networks:
|
||||||
|
- dokploy-network
|
||||||
|
command: ["sh", "-c", "redis-server --requirepass \"${REDIS_PASSWORD}\""]
|
||||||
|
volumes:
|
||||||
|
- redis_data:/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
restart: always
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
storage_data:
|
||||||
|
postgres_data:
|
||||||
|
redis_data:
|
||||||
41
apps/dokploy/templates/chatwoot/index.ts
Normal file
41
apps/dokploy/templates/chatwoot/index.ts
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
import {
|
||||||
|
type DomainSchema,
|
||||||
|
type Schema,
|
||||||
|
type Template,
|
||||||
|
generatePassword,
|
||||||
|
generateRandomDomain,
|
||||||
|
generateBase64,
|
||||||
|
} from "../utils";
|
||||||
|
|
||||||
|
export function generate(schema: Schema): Template {
|
||||||
|
const mainDomain = generateRandomDomain(schema);
|
||||||
|
const postgresUsername = "chatwoot";
|
||||||
|
const postgresPassword = generatePassword();
|
||||||
|
const redisPassword = generatePassword();
|
||||||
|
const secretKeyBase = generateBase64(64);
|
||||||
|
|
||||||
|
const domains: DomainSchema[] = [
|
||||||
|
{
|
||||||
|
host: mainDomain,
|
||||||
|
port: 3000,
|
||||||
|
serviceName: "rails",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const envs = [
|
||||||
|
`CHATWOOT_HOST=${mainDomain}`,
|
||||||
|
`POSTGRES_USERNAME=${postgresUsername}`,
|
||||||
|
`POSTGRES_PASSWORD=${postgresPassword}`,
|
||||||
|
`REDIS_PASSWORD=${redisPassword}`,
|
||||||
|
`SECRET_KEY_BASE=${secretKeyBase}`,
|
||||||
|
`SMTP_ADDRESS=${process.env.SMTP_ADDRESS || ''}`,
|
||||||
|
`SMTP_PORT=${process.env.SMTP_PORT || '587'}`,
|
||||||
|
`SMTP_USERNAME=${process.env.SMTP_USERNAME || ''}`,
|
||||||
|
`SMTP_PASSWORD=${process.env.SMTP_PASSWORD || ''}`,
|
||||||
|
];
|
||||||
|
|
||||||
|
return {
|
||||||
|
domains,
|
||||||
|
envs,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -800,4 +800,18 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["links", "sharing", "social"],
|
tags: ["links", "sharing", "social"],
|
||||||
load: () => import("./linkstack/index").then((m) => m.generate),
|
load: () => import("./linkstack/index").then((m) => m.generate),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: "chatwoot",
|
||||||
|
name: "Chatwoot",
|
||||||
|
version: "v3.14.1",
|
||||||
|
description: "Open-source customer engagement suite, an alternative to Intercom, Zendesk, Salesforce Service Cloud etc.",
|
||||||
|
logo: "chatwoot.svg",
|
||||||
|
links: {
|
||||||
|
github: "https://github.com/chatwoot/chatwoot",
|
||||||
|
website: "https://www.chatwoot.com",
|
||||||
|
docs: "https://www.chatwoot.com/docs",
|
||||||
|
},
|
||||||
|
tags: ["customer-support", "live-chat", "helpdesk"],
|
||||||
|
load: () => import("./chatwoot/index").then((m) => m.generate),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user