Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add: Trudesk #452

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added templates/trudesk/assets/logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added templates/trudesk/assets/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions templates/trudesk/index.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elasticsearch URI should not be hardcoded.

Elasticsearch is NOT a template, so if you'd like to add that too, feel free to do so.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How? :) IDK how to do it. Any idea?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you got it

matbrgz marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elasticsearch URL is still hardcoded!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I said in last review, I have no idea how to prooced.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$(PROJECT_NAME)_${input.searchServiceName} may work

Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import {
Output,
randomPassword,
randomString,
Services,
} from "~templates-utils";
import { Input } from "./meta";

export function generate(input: Input): Output {
const services: Services = [];
const secretkey = randomString(32);
const mongoPassword = randomPassword();

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`NODE_ENV=production`,
`TRUDESK_DOCKER=true `,
`TD_MONGODB_SERVER=mongodb://mongo:${mongoPassword}@$(PROJECT_NAME)_${input.databaseServiceName}:27017`,
`ELATICSEARCH_URI=http://elasticsearch:9200`,
].join("\n"),
source: {
type: "image",
image: input.appServiceImage,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 8118,
},
],
mounts: [
{
type: "volume",
name: "uploads",
mountPath: "/data/storage",
},
{
type: "volume",
name: "plugins",
mountPath: "/data/storage",
},
{
type: "volume",
name: "backups",
mountPath: "/app/storage",
},
],
},
});

services.push({
type: "mongo",
data: {
projectName: input.projectName,
serviceName: input.databaseServiceName,
password: mongoPassword,
},
});

/* TODO: ADD elasticsearch */

return { services };
}
45 changes: 45 additions & 0 deletions templates/trudesk/meta.yaml
matbrgz marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Trudesk
description: Trudesk is a versatile open-source helpdesk and customer support platform designed to streamline and enhance customer service operations. With a focus on simplicity, efficiency, and collaboration, Trudesk provides businesses with a powerful toolset to manage customer inquiries, tickets, and communication seamlessly.
instructions: null
changeLog:
- date: 2023-9-21
description: first release
links:
- label: Website
url: https://trudesk.io/
- label: Github
url: https://github.com/polonel/trudesk
contributors:
- name: matbrgz
url: https://github.com/matbrgz
schema:
type: object
required:
- projectName
- defaultLocale
- appServiceName
- appServiceImage
- databaseServiceName
- redisServiceName
properties:
projectName:
type: string
title: Project Name
defaultLocale:
type: string
title: Default Locale
default: en
appServiceName:
type: string
title: App Service Name
default: trudesk
appServiceImage:
type: string
title: App Service Image
default: polonel/trudesk:1.2.9
databaseServiceName:
type: string
title: Database Service Name
default: trudesk-db
tags:
- CRM