Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
marktopper committed Mar 21, 2024
2 parents 83e990d + 0f453d3 commit d7e2559
Show file tree
Hide file tree
Showing 26 changed files with 692 additions and 69 deletions.
55 changes: 37 additions & 18 deletions templates/chatwoot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,32 @@ export function generate(input: Input): Output {
const randomPasswordRedis = randomPassword();
const randomPasswordPostgres = randomPassword();

const env = [
`SECRET_KEY_BASE=${secretkey}`,
`FRONTEND_URL=https://$(PRIMARY_DOMAIN)`,
`DEFAULT_LOCALE=${input.defaultLocale}`,
`FORCE_SSL=false`,
`ENABLE_ACCOUNT_SIGNUP=true`,
`REDIS_URL=redis://default@$(PROJECT_NAME)_${input.redisServiceName}:6379`,
`REDIS_PASSWORD=${randomPasswordRedis}`,
`REDIS_OPENSSL_VERIFY_MODE=none`,
`POSTGRES_DATABASE=$(PROJECT_NAME)`,
`POSTGRES_HOST=$(PROJECT_NAME)_${input.databaseServiceName}`,
`POSTGRES_USERNAME=postgres`,
`POSTGRES_PASSWORD=${randomPasswordPostgres}`,
`RAILS_MAX_THREADS=5`,
`NODE_ENV=production`,
`RAILS_ENV=production`,
`INSTALLATION_ENV=docker`,
`TRUSTED_PROXIES=*`,
].join("\n");

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`SECRET_KEY_BASE=${secretkey}`,
`FRONTEND_URL=https://$(PRIMARY_DOMAIN)`,
`DEFAULT_LOCALE=${input.defaultLocale}`,
`FORCE_SSL=true`,
`ENABLE_ACCOUNT_SIGNUP=true`,
`REDIS_URL=redis://default@$(PROJECT_NAME)_${input.redisServiceName}:6379`,
`REDIS_PASSWORD=${randomPasswordRedis}`,
`REDIS_OPENSSL_VERIFY_MODE=none`,
`POSTGRES_DATABASE=$(PROJECT_NAME)`,
`POSTGRES_HOST=$(PROJECT_NAME)_${input.databaseServiceName}`,
`POSTGRES_USERNAME=postgres`,
`POSTGRES_PASSWORD=${randomPasswordPostgres}`,
`RAILS_MAX_THREADS=5`,
`NODE_ENV=production`,
`RAILS_ENV=production`,
`INSTALLATION_ENV=docker`,
].join("\n"),
env,
source: {
type: "image",
image: input.appServiceImage,
Expand Down Expand Up @@ -64,6 +67,22 @@ export function generate(input: Input): Output {
},
});

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.sidekiqServiceName,
env,
source: {
type: "image",
image: input.appServiceImage,
},
deploy: {
command: "bundle exec sidekiq -C config/sidekiq.yml",
},
},
});

services.push({
type: "redis",
data: {
Expand Down
19 changes: 14 additions & 5 deletions templates/chatwoot/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ schema:
- defaultLocale
- appServiceName
- appServiceImage
- sidekiqServiceName
- databaseServiceName
- redisServiceName
properties:
Expand All @@ -49,7 +50,11 @@ schema:
appServiceImage:
type: string
title: App Service Image
default: chatwoot/chatwoot:v2.17.1
default: chatwoot/chatwoot:v3.4.0
sidekiqServiceName:
type: string
title: Sidekiq Service Name
default: chatwoot-sidekiq
databaseServiceName:
type: string
title: Database Service Name
Expand All @@ -65,12 +70,14 @@ benefits:
It provides a streamlined platform for handling customer queries, ensuring
quick responses and high productivity.
- title: Multi-Channel Support
description: With Chatwoot, businesses can stay connected with their customers
description:
With Chatwoot, businesses can stay connected with their customers
across various platforms including email, Facebook, Instagram, Line, SMS,
Telegram, Twitter, and WhatsApp. This ensures a seamless customer
experience, regardless of the communication channel.
- title: Real-Time Insights
description: Chatwoot provides real-time insights into your conversations and
description:
Chatwoot provides real-time insights into your conversations and
agent performance. It allows businesses to track their customer
satisfaction score on autopilot, ensuring continuous improvement in
customer service.
Expand All @@ -92,11 +99,13 @@ features:
conversations, providing quick responses to customer queries and improving
agent productivity.
- title: Mobile Apps
description: Stay connected with your customers on the go with Chatwoot's mobile
description:
Stay connected with your customers on the go with Chatwoot's mobile
apps. It ensures uninterrupted customer service, regardless of your
location.
- title: Integrations
description: Chatwoot can be integrated with various platforms including Slack,
description:
Chatwoot can be integrated with various platforms including Slack,
Dialogflow, and more. This allows businesses to extend Chatwoot's
functionalities for back-office operations and other use cases.
tags:
Expand Down
Binary file added templates/cloudcommander/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/cloudcommander/assets/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions templates/cloudcommander/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import { Output, Services } from "~templates-utils";
import { Input } from "./meta";

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

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`CLOUDCMD_ROOT=/mnt/fs`,
`CLOUDCMD_AUTH=true`,
`CLOUDCMD_USERNAME=${input.username}`,
`CLOUDCMD_PASSWORD=${input.password}`,
].join("\n"),
source: {
type: "image",
image: input.appServiceImage,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 80,
},
],
mounts: [
{
type: "bind",
hostPath: "/root",
mountPath: "/root",
},
{
type: "bind",
hostPath: "/",
mountPath: "/mnt/fs",
},
],
},
});

return { services };
}
41 changes: 41 additions & 0 deletions templates/cloudcommander/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Cloud Commander
description: Cloud Commander is a file manager for the web. It includes a command-line console and a text editor. Cloud Commander helps you manage your server and work with files, directories and programs in a web browser from any computer, mobile or tablet.
instructions:
changeLog:
- date: 2024-01-22
description: first release
links:
- label: Website
url: https://cloudcmd.io
- label: Github
url: https://github.com/coderaiser/cloudcmd
contributors:
- name: Serban Alexandru
url: https://github.com/serban-alexandru
schema:
type: object
required:
- projectName
- appServiceName
- appServiceImage
- username
- password
properties:
projectName:
type: string
title: Project Name
appServiceName:
type: string
title: App Service Name
default: cloudcmd
appServiceImage:
type: string
title: App Service Image
default: coderaiser/cloudcmd:17.0.0-alpine
username:
type: string
title: Username
default: admin
password:
type: string
title: Password
Binary file added templates/coder/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/coder/assets/screenshot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
56 changes: 56 additions & 0 deletions templates/coder/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { Output, randomPassword, Services } from "~templates-utils";
import { Input } from "./meta";

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

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`CODER_ACCESS_URL=https://$(PRIMARY_DOMAIN)`,
`CODER_HTTP_ADDRESS=0.0.0.0:80`,
`CODER_PG_CONNECTION_URL=postgres://postgres:${databasePassword}@$(PROJECT_NAME)_${input.databaseServiceName}:5432/$(PROJECT_NAME)?sslmode=disable`,
].join("\n"),
source: {
type: "image",
image: input.appServiceImage,
},
deploy: {
groups: ["998", "999"],
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
port: 80,
},
],
mounts: [
{
type: "bind",
hostPath: "/var/run/docker.sock",
mountPath: "/var/run/docker.sock",
},
{
type: "volume",
name: "config",
mountPath: "/home/coder/.config",
},
],
},
});

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

return { services };
}
39 changes: 39 additions & 0 deletions templates/coder/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Coder
description: Coder is an open source cloud development environment (CDE) that you download and host in your cloud. Deploy a single solution in seconds that provisions the infrastructure, IDE, language, and tools your developers desire. Upgrade to the Enterprise version and add security, governance, and observability capabilities for Platform teams.
instructions:
changeLog:
- date: 2024-01-23
description: first release
links:
- label: Website
url: https://coder.com
- label: Documentation
url: https://coder.com/docs/v2/latest
- label: Github
url: https://github.com/coder/coder
contributors:
- name: Serban Alexandru
url: https://github.com/serban-alexandru
schema:
type: object
required:
- projectName
- appServiceName
- appServiceImage
- databaseServiceName
properties:
projectName:
type: string
title: Project Name
appServiceName:
type: string
title: App Service Name
default: coder
appServiceImage:
type: string
title: App Service Image
default: ghcr.io/coder/coder:latest
databaseServiceName:
type: string
title: Database Service Name
default: coder-db
1 change: 1 addition & 0 deletions templates/elasticsearch/assets/logo.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions templates/elasticsearch/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { Output, Services } from "~templates-utils";
import { Input } from "./meta";

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

services.push({
type: "app",
data: {
projectName: input.projectName,
serviceName: input.appServiceName,
env: [
`ELASTIC_PASSWORD=${input.password}`,
`discovery.type=single-node`,
`xpack.security.enabled=true`,
].join("\n"),
source: {
type: "image",
image: input.appServiceImage,
},
domains: [
{
host: "$(EASYPANEL_DOMAIN)",
https: true,
port: 9200,
path: "/",
},
],
mounts: [
{
type: "volume",
name: "data",
mountPath: "/usr/share/elasticsearch/data",
},
],
resources: {
memoryReservation: 0,
memoryLimit: 1024,
cpuReservation: 0,
cpuLimit: 0,
},
},
});

return { services };
}

0 comments on commit d7e2559

Please sign in to comment.