mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(templates): remove legacy template files and update project structure
- Delete all template-related files in `apps/dokploy/templates` - Remove template image files from `apps/dokploy/public/templates` - Update server-side template processing with new implementation - Clean up unused configuration and utility files
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { generatePassword } from "@dokploy/server/templates/utils";
|
||||
import { generatePassword } from "@dokploy/server/templates";
|
||||
import { faker } from "@faker-js/faker";
|
||||
import { customAlphabet } from "nanoid";
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export * from "./utils/backups/mongo";
|
||||
export * from "./utils/backups/mysql";
|
||||
export * from "./utils/backups/postgres";
|
||||
export * from "./utils/backups/utils";
|
||||
export * from "./templates/utils/processors";
|
||||
export * from "./templates/processors";
|
||||
|
||||
export * from "./utils/notifications/build-error";
|
||||
export * from "./utils/notifications/build-success";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { db } from "@dokploy/server/db";
|
||||
import { generateRandomDomain } from "@dokploy/server/templates/utils";
|
||||
import { generateRandomDomain } from "@dokploy/server/templates";
|
||||
import { manageDomain } from "@dokploy/server/utils/traefik/domain";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
mariadb,
|
||||
} from "@dokploy/server/db/schema";
|
||||
import { buildAppName } from "@dokploy/server/db/schema";
|
||||
import { generatePassword } from "@dokploy/server/templates/utils";
|
||||
import { generatePassword } from "@dokploy/server/templates";
|
||||
import { buildMariadb } from "@dokploy/server/utils/databases/mariadb";
|
||||
import { pullImage } from "@dokploy/server/utils/docker/utils";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { db } from "@dokploy/server/db";
|
||||
import { type apiCreateMongo, backups, mongo } from "@dokploy/server/db/schema";
|
||||
import { buildAppName } from "@dokploy/server/db/schema";
|
||||
import { generatePassword } from "@dokploy/server/templates/utils";
|
||||
import { generatePassword } from "@dokploy/server/templates";
|
||||
import { buildMongo } from "@dokploy/server/utils/databases/mongo";
|
||||
import { pullImage } from "@dokploy/server/utils/docker/utils";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { db } from "@dokploy/server/db";
|
||||
import { type apiCreateMySql, backups, mysql } from "@dokploy/server/db/schema";
|
||||
import { buildAppName } from "@dokploy/server/db/schema";
|
||||
import { generatePassword } from "@dokploy/server/templates/utils";
|
||||
import { generatePassword } from "@dokploy/server/templates";
|
||||
import { buildMysql } from "@dokploy/server/utils/databases/mysql";
|
||||
import { pullImage } from "@dokploy/server/utils/docker/utils";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
postgres,
|
||||
} from "@dokploy/server/db/schema";
|
||||
import { buildAppName } from "@dokploy/server/db/schema";
|
||||
import { generatePassword } from "@dokploy/server/templates/utils";
|
||||
import { generatePassword } from "@dokploy/server/templates";
|
||||
import { buildPostgres } from "@dokploy/server/utils/databases/postgres";
|
||||
import { pullImage } from "@dokploy/server/utils/docker/utils";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
} from "@dokploy/server/db/schema";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
import { and, desc, eq } from "drizzle-orm";
|
||||
import { generatePassword } from "../templates/utils";
|
||||
import { generatePassword } from "../templates";
|
||||
import { removeService } from "../utils/docker/utils";
|
||||
import { removeDirectoryCode } from "../utils/filesystem/directory";
|
||||
import { authGithub } from "../utils/providers/github";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { db } from "@dokploy/server/db";
|
||||
import { type apiCreateRedis, redis } from "@dokploy/server/db/schema";
|
||||
import { buildAppName } from "@dokploy/server/db/schema";
|
||||
import { generatePassword } from "@dokploy/server/templates/utils";
|
||||
import { generatePassword } from "@dokploy/server/templates";
|
||||
import { buildRedis } from "@dokploy/server/utils/databases/redis";
|
||||
import { pullImage } from "@dokploy/server/utils/docker/utils";
|
||||
import { TRPCError } from "@trpc/server";
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
/**
|
||||
* Configuration for the GitHub template repository
|
||||
*/
|
||||
export const templateConfig = {
|
||||
/**
|
||||
* GitHub repository owner
|
||||
* @default "dokploy"
|
||||
*/
|
||||
owner: process.env.TEMPLATE_REPO_OWNER || "dokploy",
|
||||
|
||||
/**
|
||||
* GitHub repository name
|
||||
* @default "templates"
|
||||
*/
|
||||
repo: process.env.TEMPLATE_REPO_NAME || "templates",
|
||||
|
||||
/**
|
||||
* GitHub repository branch
|
||||
* @default "main"
|
||||
*/
|
||||
branch: process.env.TEMPLATE_REPO_BRANCH || "main",
|
||||
|
||||
/**
|
||||
* Cache duration in milliseconds
|
||||
* How long to cache templates before checking for updates
|
||||
* @default 3600000 (1 hour)
|
||||
*/
|
||||
cacheDuration: Number.parseInt(
|
||||
process.env.TEMPLATE_CACHE_DURATION || "3600000",
|
||||
10,
|
||||
),
|
||||
|
||||
/**
|
||||
* GitHub API token (optional)
|
||||
* Used for higher rate limits
|
||||
*/
|
||||
token: process.env.GITHUB_TOKEN,
|
||||
};
|
||||
@@ -1,44 +0,0 @@
|
||||
metadata:
|
||||
id: plausible
|
||||
name: Plausible Analytics
|
||||
description: Privacy-focused Google Analytics alternative
|
||||
tags:
|
||||
- analytics
|
||||
- privacy
|
||||
- statistics
|
||||
|
||||
variables:
|
||||
db_password: ${password:32}
|
||||
admin_password: ${password:16}
|
||||
secret_key: ${base64:64}
|
||||
main_domain: ${randomDomain}
|
||||
|
||||
config:
|
||||
domains:
|
||||
- serviceName: plausible
|
||||
port: 8000
|
||||
path: /
|
||||
host: plausible-${main_domain}
|
||||
- serviceName: admin
|
||||
port: 8001
|
||||
path: /admin
|
||||
host: admin-${main_domain}
|
||||
|
||||
env:
|
||||
ADMIN_USER_EMAIL: admin@example.com
|
||||
ADMIN_USER_NAME: admin
|
||||
ADMIN_USER_PWD: ${admin_password}
|
||||
SECRET_KEY_BASE: ${secret_key}
|
||||
DB: plausible
|
||||
DB_USER: plausible
|
||||
DB_PASSWORD: ${db_password}
|
||||
CLICKHOUSE_USER: default
|
||||
CLICKHOUSE_PASSWORD: ${password:32}
|
||||
DOMAIN: ${domain:plausible}
|
||||
ADMIN_DOMAIN: ${domain:admin}
|
||||
|
||||
mounts:
|
||||
- filePath: nginx.conf
|
||||
content: |
|
||||
server_name ${domain:plausible};
|
||||
# resto de la configuración...
|
||||
@@ -1,42 +0,0 @@
|
||||
{
|
||||
"metadata": {
|
||||
"id": "plausible",
|
||||
"name": "Plausible Analytics",
|
||||
"version": "latest",
|
||||
"description": "Privacy-focused Google Analytics alternative",
|
||||
"logo": "plausible.svg",
|
||||
"links": {
|
||||
"website": "https://plausible.io",
|
||||
"docs": "https://plausible.io/docs",
|
||||
"github": "https://github.com/plausible/analytics"
|
||||
},
|
||||
"tags": ["analytics", "privacy", "statistics"]
|
||||
},
|
||||
"config": {
|
||||
"domains": {
|
||||
"plausible": {
|
||||
"port": 8000,
|
||||
"path": "/",
|
||||
"serviceName": "plausible",
|
||||
"host": "plausible.com"
|
||||
}
|
||||
},
|
||||
"env": {
|
||||
"ADMIN_USER_EMAIL": "admin@example.com",
|
||||
"ADMIN_USER_NAME": "admin",
|
||||
"ADMIN_USER_PWD": "plausible",
|
||||
"SECRET_KEY_BASE": "plausible",
|
||||
"DB": "plausible",
|
||||
"DB_USER": "plausible",
|
||||
"DB_PASSWORD": "plausible",
|
||||
"CLICKHOUSE_USER": "default",
|
||||
"CLICKHOUSE_PASSWORD": "default"
|
||||
},
|
||||
"mounts": [
|
||||
{
|
||||
"filePath": "custom.css",
|
||||
"content": "/* Add your custom CSS here */"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user