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,30 @@
services:
answer:
image: apache/answer:1.4.1
ports:
- '80'
restart: on-failure
volumes:
- answer-data:/data
depends_on:
db:
condition: service_healthy
db:
image: postgres:16
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 5
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: answer
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
answer-data:
db-data:

View File

@@ -0,0 +1,33 @@
import {
type DomainSchema,
type Schema,
type Template,
generateHash,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainServiceHash = generateHash(schema.projectName);
const mainDomain = generateRandomDomain(schema);
const domains: DomainSchema[] = [
{
host: mainDomain,
port: 9080,
serviceName: "answer",
},
];
const envs = [
`ANSWER_HOST=http://${mainDomain}`,
`SERVICE_HASH=${mainServiceHash}`,
];
const mounts: Template["mounts"] = [];
return {
envs,
mounts,
domains,
};
}