diff --git a/apps/dokploy/public/templates/logto.png b/apps/dokploy/public/templates/logto.png new file mode 100644 index 00000000..c7bfec1d Binary files /dev/null and b/apps/dokploy/public/templates/logto.png differ diff --git a/apps/dokploy/templates/logto/docker-compose.yml b/apps/dokploy/templates/logto/docker-compose.yml new file mode 100644 index 00000000..e1f7c46a --- /dev/null +++ b/apps/dokploy/templates/logto/docker-compose.yml @@ -0,0 +1,42 @@ +services: + app: + depends_on: + postgres: + condition: service_healthy + image: svhd/logto:1.22.0 + entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"] + ports: + - 3001 + - 3002 + networks: + - dokploy-network + environment: + TRUST_PROXY_HEADER: 1 + DB_URL: postgres://logto:${LOGTO_POSTGRES_PASSWORD}@postgres:5432/logto + ENDPOINT: ${LOGTO_ENDPOINT} + ADMIN_ENDPOINT: ${LOGTO_ADMIN_ENDPOINT} + volumes: + - logto-connectors:/etc/logto/packages/core/connectors + postgres: + image: postgres:17-alpine + user: postgres + networks: + - dokploy-network + environment: + POSTGRES_USER: logto + POSTGRES_PASSWORD: ${LOGTO_POSTGRES_PASSWORD} + volumes: + - postgres-data:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready"] + interval: 10s + timeout: 5s + retries: 5 + +networks: + dokploy-network: + external: true + +volumes: + logto-connectors: + postgres-data: diff --git a/apps/dokploy/templates/logto/index.ts b/apps/dokploy/templates/logto/index.ts new file mode 100644 index 00000000..09b099d8 --- /dev/null +++ b/apps/dokploy/templates/logto/index.ts @@ -0,0 +1,37 @@ +import { + type DomainSchema, + type Schema, + type Template, + generatePassword, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + const adminDomain = generateRandomDomain(schema); + const postgresPassword = generatePassword(); + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 3001, + serviceName: "app", + }, + { + host: adminDomain, + port: 3002, + serviceName: "app", + }, + ]; + + const envs = [ + `LOGTO_ENDPOINT=http://${adminDomain}`, + `LOGTO_ADMIN_ENDPOINT=http://${adminDomain}`, + `LOGTO_POSTGRES_PASSWORD=${postgresPassword}`, + ]; + + return { + domains, + envs, + }; +} diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 79d0b479..d268d6f9 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -1016,8 +1016,8 @@ export const templates: TemplateData[] = [ }, tags: ["browser", "automation"], load: () => import("./browserless/index").then((m) => m.generate), - }, - { + }, + { id: "drawio", name: "draw.io", version: "24.7.17", @@ -1031,8 +1031,8 @@ export const templates: TemplateData[] = [ }, tags: ["drawing", "diagrams"], load: () => import("./drawio/index").then((m) => m.generate), - }, - { + }, + { id: "kimai", name: "Kimai", version: "2.26.0", @@ -1047,4 +1047,19 @@ export const templates: TemplateData[] = [ tags: ["invoice", "business", "finance"], load: () => import("./kimai/index").then((m) => m.generate), }, + { + id: "logto", + name: "Logto", + version: "1.22.0", + description: + "Logto is an open-source Identity and Access Management (IAM) platform designed to streamline Customer Identity and Access Management (CIAM) and Workforce Identity Management.", + logo: "logto.png", + links: { + github: "https://github.com/logto-io/logto", + website: "https://logto.io/", + docs: "https://docs.logto.io/introduction", + }, + tags: ["identity", "auth"], + load: () => import("./logto/index").then((m) => m.generate), + }, ];