mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Add: Peppermint.sh
This commit is contained in:
13
apps/dokploy/public/templates/peppermint.svg
Normal file
13
apps/dokploy/public/templates/peppermint.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 13 KiB |
36
apps/dokploy/templates/peppermint/docker-compose.yml
Normal file
36
apps/dokploy/templates/peppermint/docker-compose.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
peppermint_postgres:
|
||||
image: postgres:latest
|
||||
restart: always
|
||||
networks:
|
||||
- dokploy-network
|
||||
volumes:
|
||||
- pgdata:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: peppermint
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
POSTGRES_DB: peppermint
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U peppermint"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
peppermint:
|
||||
image: pepperlabs/peppermint:latest
|
||||
restart: always
|
||||
networks:
|
||||
- dokploy-network
|
||||
depends_on:
|
||||
peppermint_postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_USERNAME: "peppermint"
|
||||
DB_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
DB_HOST: "peppermint_postgres"
|
||||
SECRET: ${SECRET}
|
||||
|
||||
volumes:
|
||||
pgdata:
|
||||
43
apps/dokploy/templates/peppermint/index.ts
Normal file
43
apps/dokploy/templates/peppermint/index.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
// Generate domains and secrets
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const apiDomain = generateRandomDomain(schema);
|
||||
const postgresPassword = generatePassword();
|
||||
const secret = generateBase64(32);
|
||||
|
||||
// Configure domain routing
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "peppermint",
|
||||
},
|
||||
{
|
||||
host: apiDomain,
|
||||
port: 5003,
|
||||
serviceName: "peppermint",
|
||||
},
|
||||
];
|
||||
|
||||
// Set environment variables
|
||||
const envs = [
|
||||
`MAIN_DOMAIN=${mainDomain}`,
|
||||
`API_DOMAIN=${apiDomain}`,
|
||||
`POSTGRES_PASSWORD=${postgresPassword}`,
|
||||
`SECRET=${secret}`,
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
@@ -702,4 +702,18 @@ export const templates: TemplateData[] = [
|
||||
tags: ["IA", "chat"],
|
||||
load: () => import("./lobe-chat/index").then((m) => m.generate),
|
||||
},
|
||||
{
|
||||
id: "peppermint",
|
||||
name: "Peppermint",
|
||||
version: "latest",
|
||||
description: "Peppermint is a modern, open-source API development platform that helps you build, test and document your APIs.",
|
||||
logo: "peppermint.svg",
|
||||
links: {
|
||||
github: "https://github.com/Peppermint-Lab/peppermint",
|
||||
website: "https://peppermint.sh/",
|
||||
docs: "https://docs.peppermint.sh/"
|
||||
},
|
||||
tags: ["api", "development", "documentation"],
|
||||
load: () => import("./peppermint/index").then((m) => m.generate),
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user