Files
stats/packages/db/code-migrations/helpers.ts
Carl-Gerhard Lindesvärd 92d62c3e5c improve: prepare for coolify and general self-hosting improvements (#175)
* fix(self-hosting): improve docker compose, add healthchecks, rename env SELF_HOSTED

* improve(db): improve initial migration when no data exists

* fix(db): misstakes were made

* improve(dashboard): better curl preview depending on project type

* fix(db): fix migrations

* fix(onboarding): ensure we publish event correctly

* wip

* fix: curl preview

* add coolify template

* fix(dashboard): page -> route

* fix

* fix env
2025-06-23 22:21:11 +02:00

35 lines
764 B
TypeScript

export function printBoxMessage(title: string, lines: (string | unknown)[]) {
console.log('┌──┐');
console.log('│');
if (title) {
console.log(`${title}`);
if (lines.length) {
console.log('│');
}
}
lines.forEach((line) => {
console.log(`${line}`);
});
console.log('│');
console.log('└──┘');
}
export function getIsCluster() {
const args = process.argv;
const noClusterArg = args.includes('--no-cluster');
if (noClusterArg) {
return false;
}
return !getIsSelfHosting();
}
export function getIsSelfHosting() {
return (
process.env.NEXT_PUBLIC_SELF_HOSTED === 'true' || !!process.env.SELF_HOSTED
);
}
export function getIsDry() {
return process.argv.includes('--dry');
}