Add: Slash Template

This commit is contained in:
DrMxrcy
2024-11-12 13:27:08 -05:00
parent 814580ff2c
commit faceed12b0
4 changed files with 84 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -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:

View File

@@ -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,
};
}

View File

@@ -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),
},
];