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:
linkwarden:
environment:
- NEXTAUTH_SECRET
- NEXTAUTH_URL
- DATABASE_URL=postgresql://linkwarden:${POSTGRES_PASSWORD}@postgres:5432/linkwarden
restart: unless-stopped
image: ghcr.io/linkwarden/linkwarden:v2.9.3
ports:
- 3000
volumes:
- linkwarden-data:/data/data
depends_on:
- postgres
healthcheck:
test: curl --fail http://localhost:3000 || exit 1
interval: 60s
retries: 2
start_period: 60s
timeout: 15s
postgres:
image: postgres:17-alpine
restart: unless-stopped
user: postgres
environment:
POSTGRES_USER: linkwarden
POSTGRES_DB: linkwarden
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
linkwarden-data:
postgres-data:

View File

@@ -0,0 +1,33 @@
import {
type DomainSchema,
type Schema,
type Template,
generateBase64,
generatePassword,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const postgresPassword = generatePassword();
const nextSecret = generateBase64(32);
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 3000,
serviceName: "linkwarden",
},
];
const envs = [
`POSTGRES_PASSWORD=${postgresPassword}`,
`NEXTAUTH_SECRET=${nextSecret}`,
`NEXTAUTH_URL=http://${mainDomain}/api/v1/auth`,
];
return {
domains,
envs,
};
}