mirror of
https://github.com/FranP-code/create-better-t-stack.git
synced 2025-10-12 23:52:15 +00:00
Docker Compose Database Setup (#379)
Co-authored-by: Aman Varshney <amanvarshney.work@gmail.com>
This commit is contained in:
@@ -600,6 +600,39 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
|
||||
message: "Backend set to 'Hono' (required by Cloudflare D1)",
|
||||
});
|
||||
}
|
||||
} else if (nextStack.dbSetup === "docker") {
|
||||
if (nextStack.database === "sqlite") {
|
||||
notes.dbSetup.notes.push(
|
||||
"Docker setup is not needed for SQLite. It will be set to 'Basic Setup'.",
|
||||
);
|
||||
notes.dbSetup.hasIssue = true;
|
||||
notes.database.hasIssue = true;
|
||||
nextStack.dbSetup = "none";
|
||||
changed = true;
|
||||
changes.push({
|
||||
category: "dbSetup",
|
||||
message:
|
||||
"DB Setup set to 'Basic Setup' (SQLite doesn't need Docker)",
|
||||
});
|
||||
}
|
||||
|
||||
if (nextStack.runtime === "workers") {
|
||||
notes.dbSetup.notes.push(
|
||||
"Docker setup is not compatible with Cloudflare Workers runtime. Bun runtime will be selected.",
|
||||
);
|
||||
notes.runtime.notes.push(
|
||||
"Cloudflare Workers runtime does not support Docker setup. Bun runtime will be selected.",
|
||||
);
|
||||
notes.dbSetup.hasIssue = true;
|
||||
notes.runtime.hasIssue = true;
|
||||
nextStack.runtime = "bun";
|
||||
changed = true;
|
||||
changes.push({
|
||||
category: "dbSetup",
|
||||
message:
|
||||
"Runtime set to 'Bun' (Workers not compatible with Docker)",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (nextStack.runtime === "workers") {
|
||||
@@ -654,6 +687,24 @@ const analyzeStackCompatibility = (stack: StackState): CompatibilityResult => {
|
||||
"Database set to 'SQLite' (MongoDB not compatible with Workers)",
|
||||
});
|
||||
}
|
||||
|
||||
if (nextStack.dbSetup === "docker") {
|
||||
notes.runtime.notes.push(
|
||||
"Cloudflare Workers runtime does not support Docker setup. D1 will be selected.",
|
||||
);
|
||||
notes.dbSetup.notes.push(
|
||||
"Docker setup is not compatible with Cloudflare Workers runtime. D1 will be selected.",
|
||||
);
|
||||
notes.runtime.hasIssue = true;
|
||||
notes.dbSetup.hasIssue = true;
|
||||
nextStack.dbSetup = "d1";
|
||||
changed = true;
|
||||
changes.push({
|
||||
category: "runtime",
|
||||
message:
|
||||
"DB Setup set to 'D1' (Docker not compatible with Workers)",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const isNuxt = nextStack.webFrontend.includes("nuxt");
|
||||
@@ -887,6 +938,7 @@ const generateCommand = (stackState: StackState): string => {
|
||||
"supabase",
|
||||
"prisma-postgres",
|
||||
"mongodb-atlas",
|
||||
"docker",
|
||||
].includes(stackState.dbSetup);
|
||||
|
||||
if (
|
||||
|
||||
@@ -195,15 +195,20 @@
|
||||
--spacing: 0.25rem;
|
||||
--shadow-2xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
|
||||
--shadow-xs: 0px 4px 6px 0px hsl(240 30% 25% / 0.06);
|
||||
--shadow-sm: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px
|
||||
--shadow-sm:
|
||||
0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px
|
||||
hsl(240 30% 25% / 0.12);
|
||||
--shadow: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px
|
||||
--shadow:
|
||||
0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 1px 2px -1px
|
||||
hsl(240 30% 25% / 0.12);
|
||||
--shadow-md: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 2px 4px -1px
|
||||
--shadow-md:
|
||||
0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 2px 4px -1px
|
||||
hsl(240 30% 25% / 0.12);
|
||||
--shadow-lg: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 4px 6px -1px
|
||||
--shadow-lg:
|
||||
0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 4px 6px -1px
|
||||
hsl(240 30% 25% / 0.12);
|
||||
--shadow-xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 8px 10px -1px
|
||||
--shadow-xl:
|
||||
0px 4px 6px 0px hsl(240 30% 25% / 0.12), 0px 8px 10px -1px
|
||||
hsl(240 30% 25% / 0.12);
|
||||
--shadow-2xl: 0px 4px 6px 0px hsl(240 30% 25% / 0.3);
|
||||
--tracking-normal: 0em;
|
||||
@@ -258,15 +263,20 @@
|
||||
--spacing: 0.25rem;
|
||||
--shadow-2xs: 0px 2px 4px 0px hsl(240 30% 5% / 0.15);
|
||||
--shadow-xs: 0px 2px 4px 0px hsl(240 30% 5% / 0.15);
|
||||
--shadow-sm: 0px 4px 8px 0px hsl(240 30% 5% / 0.2), 0px 1px 2px -1px
|
||||
--shadow-sm:
|
||||
0px 4px 8px 0px hsl(240 30% 5% / 0.2), 0px 1px 2px -1px
|
||||
hsl(240 30% 5% / 0.15);
|
||||
--shadow: 0px 4px 8px 0px hsl(240 30% 5% / 0.2), 0px 1px 2px -1px
|
||||
--shadow:
|
||||
0px 4px 8px 0px hsl(240 30% 5% / 0.2), 0px 1px 2px -1px
|
||||
hsl(240 30% 5% / 0.15);
|
||||
--shadow-md: 0px 6px 12px 0px hsl(240 30% 5% / 0.25), 0px 2px 4px -1px
|
||||
--shadow-md:
|
||||
0px 6px 12px 0px hsl(240 30% 5% / 0.25), 0px 2px 4px -1px
|
||||
hsl(240 30% 5% / 0.2);
|
||||
--shadow-lg: 0px 8px 16px 0px hsl(240 30% 5% / 0.3), 0px 4px 6px -1px
|
||||
--shadow-lg:
|
||||
0px 8px 16px 0px hsl(240 30% 5% / 0.3), 0px 4px 6px -1px
|
||||
hsl(240 30% 5% / 0.25);
|
||||
--shadow-xl: 0px 12px 24px 0px hsl(240 30% 5% / 0.35), 0px 8px 10px -1px
|
||||
--shadow-xl:
|
||||
0px 12px 24px 0px hsl(240 30% 5% / 0.35), 0px 8px 10px -1px
|
||||
hsl(240 30% 5% / 0.3);
|
||||
--shadow-2xl: 0px 16px 32px 0px hsl(240 30% 5% / 0.4);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user