mirror of
https://github.com/Dokploy/templates
synced 2025-06-26 18:16:07 +00:00
feat: Add numerous new blueprint templates for various applications
This commit is contained in:
39
blueprints/slash/docker-compose.yml
Normal file
39
blueprints/slash/docker-compose.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
slash-app:
|
||||
image: yourselfhosted/slash:latest
|
||||
|
||||
volumes:
|
||||
- slash-app-data:/var/opt/slash
|
||||
environment:
|
||||
- SLASH_DRIVER=postgres
|
||||
- SLASH_DSN=postgresql://${DB_USER}:${DB_PASSWORD}@slash-postgres:5432/${DB_NAME}?sslmode=disable
|
||||
depends_on:
|
||||
slash-postgres:
|
||||
condition: service_healthy
|
||||
restart: unless-stopped
|
||||
|
||||
slash-postgres:
|
||||
image: postgres:16-alpine
|
||||
|
||||
volumes:
|
||||
- slash-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
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
slash-app-data:
|
||||
slash-postgres-data:
|
||||
33
blueprints/slash/index.ts
Normal file
33
blueprints/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-app",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`DB_USER=${dbUser}`,
|
||||
`DB_PASSWORD=${dbPassword}`,
|
||||
`DB_NAME=${dbName}`,
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user