chore(lint): fix formating

This commit is contained in:
Andrey Kucherenko
2024-08-01 13:00:03 +03:00
parent 533a5e490f
commit dc626f1a94

View File

@@ -1,41 +1,42 @@
import {
type Schema,
type Template,
generateHash,
generateRandomDomain, generatePassword,
type Schema,
type Template,
generateHash,
generatePassword,
generateRandomDomain,
} from "../utils";
export function generate(schema: Schema): Template {
const mainServiceHash = generateHash(schema.projectName);
const password = generatePassword();
const randomDomain = generateRandomDomain(schema);
const envs = [
`TEABLE_HOST=${randomDomain}`,
`TEABLE_PORT=3000`,
`HASH=${mainServiceHash}`,
`TIMEZONE=UTC`,
`# Postgres`,
`POSTGRES_HOST=teable-db`,
`POSTGRES_PORT=5432`,
`POSTGRES_DB=teable`,
`POSTGRES_USER=teable`,
`POSTGRES_PASSWORD=${password}`,
`# App`,
`PUBLIC_ORIGIN=https://\${TABLE_HOST}`,
`PRISMA_DATABASE_URL=postgresql://\${POSTGRES_USER}:\${POSTGRES_PASSWORD}@\${POSTGRES_HOST}:\${POSTGRES_PORT}/\${POSTGRES_DB}`,
`PUBLIC_DATABASE_PROXY=127.0.0.1:42345`,
`# Need to support sending emails to enable the following configurations`,
`# You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly.`,
`#BACKEND_MAIL_HOST=smtp.teable.io`,
`#BACKEND_MAIL_PORT=465`,
`#BACKEND_MAIL_SECURE=true`,
`#BACKEND_MAIL_SENDER=noreply.teable.io`,
`#BACKEND_MAIL_SENDER_NAME=Teable`,
`#BACKEND_MAIL_AUTH_USER=username`,
`#BACKEND_MAIL_AUTH_PASS=password`,
];
const mainServiceHash = generateHash(schema.projectName);
const password = generatePassword();
const randomDomain = generateRandomDomain(schema);
const envs = [
`TEABLE_HOST=${randomDomain}`,
"TEABLE_PORT=3000",
`HASH=${mainServiceHash}`,
"TIMEZONE=UTC",
"# Postgres",
"POSTGRES_HOST=teable-db",
"POSTGRES_PORT=5432",
"POSTGRES_DB=teable",
"POSTGRES_USER=teable",
`POSTGRES_PASSWORD=${password}`,
"# App",
"PUBLIC_ORIGIN=https://${TABLE_HOST}",
"PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}",
"PUBLIC_DATABASE_PROXY=127.0.0.1:42345",
"# Need to support sending emails to enable the following configurations",
"# You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly.",
"#BACKEND_MAIL_HOST=smtp.teable.io",
"#BACKEND_MAIL_PORT=465",
"#BACKEND_MAIL_SECURE=true",
"#BACKEND_MAIL_SENDER=noreply.teable.io",
"#BACKEND_MAIL_SENDER_NAME=Teable",
"#BACKEND_MAIL_AUTH_USER=username",
"#BACKEND_MAIL_AUTH_PASS=password",
];
return {
envs,
};
return {
envs,
};
}