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:
38
blueprints/peppermint/docker-compose.yml
Normal file
38
blueprints/peppermint/docker-compose.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
version: "3.8"
|
||||
|
||||
services:
|
||||
peppermint-postgres:
|
||||
image: postgres:latest
|
||||
restart: always
|
||||
|
||||
volumes:
|
||||
- peppermint-postgres-data:/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-app:
|
||||
image: pepperlabs/peppermint:latest
|
||||
restart: always
|
||||
|
||||
depends_on:
|
||||
peppermint-postgres:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
DB_USERNAME: "peppermint"
|
||||
DB_PASSWORD: ${POSTGRES_PASSWORD}
|
||||
DB_HOST: "peppermint-postgres"
|
||||
SECRET: ${SECRET}
|
||||
|
||||
networks:
|
||||
dokploy-network:
|
||||
external: true
|
||||
|
||||
volumes:
|
||||
peppermint-postgres-data:
|
||||
40
blueprints/peppermint/index.ts
Normal file
40
blueprints/peppermint/index.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
import {
|
||||
type DomainSchema,
|
||||
type Schema,
|
||||
type Template,
|
||||
generateBase64,
|
||||
generatePassword,
|
||||
generateRandomDomain,
|
||||
} from "../utils";
|
||||
|
||||
export function generate(schema: Schema): Template {
|
||||
const mainDomain = generateRandomDomain(schema);
|
||||
const apiDomain = generateRandomDomain(schema);
|
||||
const postgresPassword = generatePassword();
|
||||
const secret = generateBase64(32);
|
||||
|
||||
const domains: DomainSchema[] = [
|
||||
{
|
||||
host: mainDomain,
|
||||
port: 3000,
|
||||
serviceName: "peppermint-app",
|
||||
},
|
||||
{
|
||||
host: apiDomain,
|
||||
port: 5003,
|
||||
serviceName: "peppermint-app",
|
||||
},
|
||||
];
|
||||
|
||||
const envs = [
|
||||
`MAIN_DOMAIN=${mainDomain}`,
|
||||
`API_DOMAIN=${apiDomain}`,
|
||||
`POSTGRES_PASSWORD=${postgresPassword}`,
|
||||
`SECRET=${secret}`,
|
||||
];
|
||||
|
||||
return {
|
||||
domains,
|
||||
envs,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user