mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Add: Slash Template
This commit is contained in:
BIN
apps/dokploy/public/templates/slash.png
Normal file
BIN
apps/dokploy/public/templates/slash.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
37
apps/dokploy/templates/slash/docker-compose.yml
Normal file
37
apps/dokploy/templates/slash/docker-compose.yml
Normal 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:
|
||||||
33
apps/dokploy/templates/slash/index.ts
Normal file
33
apps/dokploy/templates/slash/index.ts
Normal 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,
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -772,4 +772,18 @@ export const templates: TemplateData[] = [
|
|||||||
tags: ["cms", "content-management", "publishing"],
|
tags: ["cms", "content-management", "publishing"],
|
||||||
load: () => import("./postiz/index").then((m) => m.generate),
|
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),
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in New Issue
Block a user