* 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
35 lines
764 B
TypeScript
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');
|
|
}
|