diff --git a/apps/dokploy/public/templates/slash.png b/apps/dokploy/public/templates/slash.png new file mode 100644 index 00000000..c843b409 Binary files /dev/null and b/apps/dokploy/public/templates/slash.png differ diff --git a/apps/dokploy/templates/slash/docker-compose.yml b/apps/dokploy/templates/slash/docker-compose.yml new file mode 100644 index 00000000..fce3114e --- /dev/null +++ b/apps/dokploy/templates/slash/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3.8" + +services: + slash: + image: yourselfhosted/slash:latest + networks: + - dokploy-network + volumes: + - slash_data:/var/opt/slash + environment: + - SLASH_DRIVER=postgres + - SLASH_DSN=postgresql://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}?sslmode=disable + depends_on: + db: + condition: service_healthy + restart: unless-stopped + + db: + image: postgres:16-alpine + networks: + - dokploy-network + volumes: + - postgres_data:/var/lib/postgresql/data + environment: + - POSTGRES_USER=${DB_USER} + - POSTGRES_PASSWORD=${DB_PASSWORD} + - POSTGRES_DB=${DB_NAME} + healthcheck: + test: ["CMD-SHELL", "pg_isready -U ${DB_USER} -d ${DB_NAME}"] + interval: 10s + timeout: 5s + retries: 5 + restart: unless-stopped + +volumes: + slash_data: + postgres_data: \ No newline at end of file diff --git a/apps/dokploy/templates/slash/index.ts b/apps/dokploy/templates/slash/index.ts new file mode 100644 index 00000000..5d2bcdb2 --- /dev/null +++ b/apps/dokploy/templates/slash/index.ts @@ -0,0 +1,33 @@ +import { + type DomainSchema, + type Schema, + type Template, + generatePassword, + generateRandomDomain, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainDomain = generateRandomDomain(schema); + const dbPassword = generatePassword(); + const dbUser = "slash"; + const dbName = "slash"; + + const domains: DomainSchema[] = [ + { + host: mainDomain, + port: 5231, + serviceName: "slash", + }, + ]; + + const envs = [ + `DB_USER=${dbUser}`, + `DB_PASSWORD=${dbPassword}`, + `DB_NAME=${dbName}`, + ]; + + return { + domains, + envs, + }; +} \ No newline at end of file diff --git a/apps/dokploy/templates/templates.ts b/apps/dokploy/templates/templates.ts index 49f96282..cdfa312e 100644 --- a/apps/dokploy/templates/templates.ts +++ b/apps/dokploy/templates/templates.ts @@ -772,4 +772,18 @@ export const templates: TemplateData[] = [ tags: ["cms", "content-management", "publishing"], load: () => import("./postiz/index").then((m) => m.generate), }, + { + id: "slash", + name: "Slash", + version: "latest", + description: "Slash is a modern, self-hosted bookmarking service and link shortener that helps you organize and share your favorite links.", + logo: "slash.png", + links: { + github: "https://github.com/yourselfhosted/slash", + website: "https://github.com/yourselfhosted/slash#readme", + docs: "https://github.com/yourselfhosted/slash/wiki", + }, + tags: ["bookmarks", "link-shortener", "self-hosted"], + load: () => import("./slash/index").then((m) => m.generate), + }, ];