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 { import {
type Schema, type Schema,
type Template, type Template,
generateHash, generateHash,
generateRandomDomain, generatePassword, generatePassword,
generateRandomDomain,
} from "../utils"; } from "../utils";
export function generate(schema: Schema): Template { export function generate(schema: Schema): Template {
const mainServiceHash = generateHash(schema.projectName); const mainServiceHash = generateHash(schema.projectName);
const password = generatePassword(); const password = generatePassword();
const randomDomain = generateRandomDomain(schema); const randomDomain = generateRandomDomain(schema);
const envs = [ const envs = [
`TEABLE_HOST=${randomDomain}`, `TEABLE_HOST=${randomDomain}`,
`TEABLE_PORT=3000`, "TEABLE_PORT=3000",
`HASH=${mainServiceHash}`, `HASH=${mainServiceHash}`,
`TIMEZONE=UTC`, "TIMEZONE=UTC",
`# Postgres`, "# Postgres",
`POSTGRES_HOST=teable-db`, "POSTGRES_HOST=teable-db",
`POSTGRES_PORT=5432`, "POSTGRES_PORT=5432",
`POSTGRES_DB=teable`, "POSTGRES_DB=teable",
`POSTGRES_USER=teable`, "POSTGRES_USER=teable",
`POSTGRES_PASSWORD=${password}`, `POSTGRES_PASSWORD=${password}`,
`# App`, "# App",
`PUBLIC_ORIGIN=https://\${TABLE_HOST}`, "PUBLIC_ORIGIN=https://${TABLE_HOST}",
`PRISMA_DATABASE_URL=postgresql://\${POSTGRES_USER}:\${POSTGRES_PASSWORD}@\${POSTGRES_HOST}:\${POSTGRES_PORT}/\${POSTGRES_DB}`, "PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}",
`PUBLIC_DATABASE_PROXY=127.0.0.1:42345`, "PUBLIC_DATABASE_PROXY=127.0.0.1:42345",
`# Need to support sending emails to enable the following configurations`, "# 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.`, "# 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_HOST=smtp.teable.io",
`#BACKEND_MAIL_PORT=465`, "#BACKEND_MAIL_PORT=465",
`#BACKEND_MAIL_SECURE=true`, "#BACKEND_MAIL_SECURE=true",
`#BACKEND_MAIL_SENDER=noreply.teable.io`, "#BACKEND_MAIL_SENDER=noreply.teable.io",
`#BACKEND_MAIL_SENDER_NAME=Teable`, "#BACKEND_MAIL_SENDER_NAME=Teable",
`#BACKEND_MAIL_AUTH_USER=username`, "#BACKEND_MAIL_AUTH_USER=username",
`#BACKEND_MAIL_AUTH_PASS=password`, "#BACKEND_MAIL_AUTH_PASS=password",
]; ];
return { return {
envs, envs,
}; };
} }