feat(fix): YOURLS lint

This commit is contained in:
DrMxrcy
2024-11-20 09:52:35 -05:00
parent c0876044b0
commit 0654804821
2 changed files with 30 additions and 29 deletions

View File

@@ -871,7 +871,8 @@ export const templates: TemplateData[] = [
id: "yourls", id: "yourls",
name: "YOURLS", name: "YOURLS",
version: "latest", version: "latest",
description: "YOURLS (Your Own URL Shortener) is a set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or Bitly).", description:
"YOURLS (Your Own URL Shortener) is a set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or Bitly).",
logo: "yourls.svg", logo: "yourls.svg",
links: { links: {
github: "https://github.com/YOURLS/YOURLS", github: "https://github.com/YOURLS/YOURLS",

View File

@@ -1,35 +1,35 @@
import { import {
type DomainSchema, type DomainSchema,
type Schema, type Schema,
type Template, type Template,
generatePassword, generatePassword,
generateRandomDomain, generateRandomDomain,
} from "../utils"; } from "../utils";
export function generate(schema: Schema): Template { export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema); const mainDomain = generateRandomDomain(schema);
const mysqlPassword = generatePassword(); const mysqlPassword = generatePassword();
const mysqlRootPassword = generatePassword(); const mysqlRootPassword = generatePassword();
const adminPassword = generatePassword(); const adminPassword = generatePassword();
const domains: DomainSchema[] = [ const domains: DomainSchema[] = [
{ {
host: mainDomain, host: mainDomain,
port: 80, port: 80,
serviceName: "yourls-app", serviceName: "yourls-app",
}, },
]; ];
const envs = [ const envs = [
`YOURLS_HOST=${mainDomain}`, `YOURLS_HOST=${mainDomain}`,
`YOURLS_ADMIN_USER=admin`, "YOURLS_ADMIN_USER=admin",
`YOURLS_ADMIN_PASSWORD=${adminPassword}`, `YOURLS_ADMIN_PASSWORD=${adminPassword}`,
`MYSQL_PASSWORD=${mysqlPassword}`, `MYSQL_PASSWORD=${mysqlPassword}`,
`MYSQL_ROOT_PASSWORD=${mysqlRootPassword}`, `MYSQL_ROOT_PASSWORD=${mysqlRootPassword}`,
]; ];
return { return {
domains, domains,
envs, envs,
}; };
} }