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: Zulip #449

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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/zulip/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/zulip/assets/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions templates/zulip/index.ts
matbrgz marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import { Output, randomPassword, Services } from "~templates-utils";
import { Input } from "./meta";

export function generate(input: Input): Output {
const services: Services = [];
const redisPassword = randomPassword();
const databasePassword = randomPassword();

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`REDIS_HOST=${input.redisServiceName}`,
`REDIS_PORT=6379`,
`REDIS_DB=1`,
`REDIS_PASSWORD=${redisPassword}`,
`WEBLATE_DEFAULT_FROM_EMAIL=${input.emailNoReply}`,
`WEBLATE_EMAIL_HOST=${input.emailHost}`,
`WEBLATE_EMAIL_HOST_USER=${input.emailUsername}`,
`WEBLATE_EMAIL_HOST_PASSWORD=${input.emailPassword}`,
`WEBLATE_SERVER_EMAIL=${input.emailUsername}`,
`WEBLATE_SITE_DOMAIN=https://$(PRIMARY_DOMAIN)`,
`WEBLATE_ADMIN_PASSWORD=changeme`,
`WEBLATE_ADMIN_EMAIL=changeme@easypanel.io`,
`POSTGRES_PASSWORD=${databasePassword}`,
`POSTGRES_USER=postgres`,
`POSTGRES_DATABASE=$(PROJECT_NAME)`,
`POSTGRES_HOST=$(PROJECT_NAME)_${input.databaseServiceName}`,
`POSTGRES_SSL_MODE=disable`,
].join("\n"),
source: {
type: "image",
image: input.appServiceImage,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 8080,
},
],
mounts: [
{
type: "volume",
name: "data",
mountPath: "/app/data",
},
{
type: "volume",
name: "cache",
mountPath: "/app/cache",
},
],
},
});

services.push({
type: "redis",
data: {
projectName: input.projectName,
serviceName: input.redisServiceName,
password: redisPassword,
},
});

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

return { services };
}
69 changes: 69 additions & 0 deletions templates/zulip/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,69 @@
name: Zulip
description: Zulip is a modern, open-source team collaboration platform that redefines the way teams communicate and collaborate. Unlike traditional messaging tools, Zulip organizes conversations into topics, ensuring that important information is easily accessible and discussions remain focused.
instructions: Please use the following credentials to login. changeme@easypanel.io|changeme
changeLog:
- date: 2023-09-21
description: first release
links:
- label: Website
url: https://zulip.com/
- label: Documentation
url: https://zulip.com/help/
- label: Github
url: https://github.com/zulip/zulip/
contributors:
- name: matbrgz
url: https://github.com/matbrgz
schema:
type: object
required:
- projectName
- appServiceName
- appServiceImage
- databaseServiceName
- redisServiceName
- emailNoReply
- emailHost
- emailUsername
- emailPassword
properties:
projectName:
type: string
title: Project Name
appServiceName:
type: string
title: App Service Name
default: weblate
appServiceImage:
type: string
title: App Service Image
default: weblate/weblate:4.16.2-1
databaseServiceName:
type: string
title: Database Service Name
default: weblate-db
redisServiceName:
type: string
title: Redis Service Name
default: weblate-redis
emailNoReply:
type: string
title: No Reply Email
emailHost:
type: string
title: Email Host
emailUsername:
type: string
title: Email Username
emailPassword:
type: string
title: Email Password
benefits:
- title: TODO
description: TODO
features:
- title: TODO
description: TODO
tags:
- Chat
- Communication