From 124a884d2e96f1c719c7e39a1d322d7df45f39c4 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 18 Aug 2024 20:43:30 -0600 Subject: [PATCH] feat: add soketi template --- .../templates/soketi/docker-compose.yml | 12 ++++++++ apps/dokploy/templates/soketi/index.ts | 28 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 apps/dokploy/templates/soketi/docker-compose.yml create mode 100644 apps/dokploy/templates/soketi/index.ts diff --git a/apps/dokploy/templates/soketi/docker-compose.yml b/apps/dokploy/templates/soketi/docker-compose.yml new file mode 100644 index 00000000..1784cdc7 --- /dev/null +++ b/apps/dokploy/templates/soketi/docker-compose.yml @@ -0,0 +1,12 @@ +version: "3" + +services: + soketi: + image: quay.io/soketi/soketi:1.4-16-debian + container_name: soketi + environment: + SOKETI_DEBUG: "1" + SOKETI_HOST: "0.0.0.0" + SOKETI_PORT: "6001" + SOKETI_METRICS_SERVER_PORT: "9601" + restart: unless-stopped diff --git a/apps/dokploy/templates/soketi/index.ts b/apps/dokploy/templates/soketi/index.ts new file mode 100644 index 00000000..47aa461d --- /dev/null +++ b/apps/dokploy/templates/soketi/index.ts @@ -0,0 +1,28 @@ +import { + type DomainSchema, + type Schema, + type Template, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + const metricsDomain = generateRandomDomain(schema); + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 6001, + serviceName: "soketi", + }, + { + host: metricsDomain, + port: 9601, + serviceName: "soketi", + }, + ]; + + return { + domains, + }; +}