feat: Add numerous new blueprint templates for various applications

This commit is contained in:
Mauricio Siu
2025-03-09 19:05:57 -06:00
parent eed6aebb85
commit fbbb4f46f3
216 changed files with 13001 additions and 44 deletions

View File

@@ -0,0 +1,40 @@
services:
app:
depends_on:
postgres:
condition: service_healthy
image: svhd/logto:1.22.0
entrypoint: ["sh", "-c", "npm run cli db seed -- --swe && npm start"]
ports:
- 3001
- 3002
environment:
TRUST_PROXY_HEADER: 1
DB_URL: postgres://logto:${LOGTO_POSTGRES_PASSWORD}@postgres:5432/logto
ENDPOINT: ${LOGTO_ENDPOINT}
ADMIN_ENDPOINT: ${LOGTO_ADMIN_ENDPOINT}
volumes:
- logto-connectors:/etc/logto/packages/core/connectors
postgres:
image: postgres:17-alpine
user: postgres
environment:
POSTGRES_USER: logto
POSTGRES_PASSWORD: ${LOGTO_POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
networks:
dokploy-network:
external: true
volumes:
logto-connectors:
postgres-data:

37
blueprints/logto/index.ts Normal file
View File

@@ -0,0 +1,37 @@
import {
type DomainSchema,
type Schema,
type Template,
generatePassword,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const adminDomain = generateRandomDomain(schema);
const postgresPassword = generatePassword();
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 3001,
serviceName: "app",
},
{
host: adminDomain,
port: 3002,
serviceName: "app",
},
];
const envs = [
`LOGTO_ENDPOINT=http://${adminDomain}`,
`LOGTO_ADMIN_ENDPOINT=http://${adminDomain}`,
`LOGTO_POSTGRES_PASSWORD=${postgresPassword}`,
];
return {
domains,
envs,
};
}