Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -53,11 +53,11 @@ const WORKER_TARGET_PATTERN = /^FROM\s+base\s+AS\s+worker\s*$/im;
|
||||
const WEB_BUILD_TARGET_PATTERN = /^FROM\s+build\s+AS\s+web-build\s*$/im;
|
||||
const API_BUILD_TARGET_PATTERN = /^FROM\s+build\s+AS\s+api-build\s*$/im;
|
||||
const WORKER_BUILD_TARGET_PATTERN = /^FROM\s+build\s+AS\s+worker-build\s*$/im;
|
||||
const BUILD_STAGE_FORBIDDEN_APP_BUILD_PATTERN = /\bpnpm\s+(?:run\s+)?build\b|\bpnpm\s+--filter\s+@toolctrl\/web\s+build\b|\bpnpm\s+--filter\s+@toolctrl\/api\s+build\b|\bpnpm\s+--filter\s+@toolctrl\/worker\s+build\b/;
|
||||
const BUILD_STAGE_FORBIDDEN_APP_BUILD_PATTERN = /\bpnpm\s+(?:run\s+)?build\b|\bpnpm\s+--filter\s+@hivegrid\/web\s+build\b|\bpnpm\s+--filter\s+@hivegrid\/api\s+build\b|\bpnpm\s+--filter\s+@hivegrid\/worker\s+build\b/;
|
||||
const SHARED_BUILD_FORBIDDEN_VITE_PATTERN = /\b(?:ARG|ENV)\s+VITE_[A-Z0-9_]+/;
|
||||
const WEB_BUILD_COMMAND_PATTERN = /^RUN\s+pnpm\s+--filter\s+@toolctrl\/web\s+build\s*$/im;
|
||||
const API_BUILD_COMMAND_PATTERN = /^RUN\s+pnpm\s+--filter\s+@toolctrl\/api\s+build\s*$/im;
|
||||
const WORKER_BUILD_COMMAND_PATTERN = /^RUN\s+pnpm\s+--filter\s+@toolctrl\/worker\s+build\s*$/im;
|
||||
const WEB_BUILD_COMMAND_PATTERN = /^RUN\s+pnpm\s+--filter\s+@hivegrid\/web\s+build\s*$/im;
|
||||
const API_BUILD_COMMAND_PATTERN = /^RUN\s+pnpm\s+--filter\s+@hivegrid\/api\s+build\s*$/im;
|
||||
const WORKER_BUILD_COMMAND_PATTERN = /^RUN\s+pnpm\s+--filter\s+@hivegrid\/worker\s+build\s*$/im;
|
||||
const WEB_RUNTIME_ARTIFACTS_TARGET_PATTERN = /^FROM\s+web-build\s+AS\s+web-runtime-artifacts\s*$/im;
|
||||
const API_RUNTIME_ARTIFACTS_TARGET_PATTERN = /^FROM\s+api-build\s+AS\s+api-runtime-artifacts\s*$/im;
|
||||
const WORKER_RUNTIME_ARTIFACTS_TARGET_PATTERN = /^FROM\s+worker-build\s+AS\s+worker-runtime-artifacts\s*$/im;
|
||||
@@ -135,6 +135,7 @@ const WORKER_REQUIRED_COPY_PATTERNS = [
|
||||
];
|
||||
const WEB_REQUIRED_COPY_PATTERNS = [
|
||||
["prisma.config.ts", /^COPY\s+--from=build\s+\/myapp\/prisma\.config\.ts\s+\/myapp\/prisma\.config\.ts\s*$/im],
|
||||
["packages/billing", /^COPY\s+--from=build\s+\/myapp\/packages\/billing\s+\/myapp\/packages\/billing\s*$/im],
|
||||
["packages/db production seed artifact", /^COPY\s+--from=build\s+\/myapp\/packages\/db\s+\/myapp\/packages\/db\s*$/im],
|
||||
["packages/storage", /^COPY\s+--from=build\s+\/myapp\/packages\/storage\s+\/myapp\/packages\/storage\s*$/im],
|
||||
["packages/storage/node_modules", /^COPY\s+--from=deps\s+\/myapp\/packages\/storage\/node_modules\s+\/myapp\/packages\/storage\/node_modules\s*$/im],
|
||||
@@ -265,6 +266,28 @@ export function checkStartScript(rootDir) {
|
||||
failures.push(`${relativePath}: must use "exec node build/server-runtime/server.js" so container signals reach the web process without pnpm indirection`);
|
||||
}
|
||||
|
||||
// Migrations and the production seed run in the entrypoint (env-gated)
|
||||
// because Coolify's pre/post_deployment_command never fired for
|
||||
// docker-image applications. Removing these blocks would silently ship
|
||||
// stale schemas again.
|
||||
if (/^set -e\s*$/m.test(content)) {
|
||||
passes.push(`${relativePath}: aborts the boot on failed migrate/seed (set -e)`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: must set -e so a failed boot migration stops the container instead of serving a stale schema`);
|
||||
}
|
||||
|
||||
if (/"\$MIGRATE_ON_BOOT"\s*=\s*"true"/.test(content) && /\bpnpm exec prisma migrate deploy --config prisma\.config\.ts\b/.test(content)) {
|
||||
passes.push(`${relativePath}: runs prisma migrate deploy gated by MIGRATE_ON_BOOT`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: must run "pnpm exec prisma migrate deploy --config prisma.config.ts" gated by MIGRATE_ON_BOOT=true (Coolify hooks never fired)`);
|
||||
}
|
||||
|
||||
if (/"\$SEED_ON_BOOT"\s*=\s*"true"/.test(content) && /\bnode packages\/db\/dist\/production-seed\.server\.js\b/.test(content)) {
|
||||
passes.push(`${relativePath}: runs the guarded production seed gated by SEED_ON_BOOT`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: must run "node packages/db/dist/production-seed.server.js" gated by SEED_ON_BOOT=true`);
|
||||
}
|
||||
|
||||
return { passes, failures, observations: [] };
|
||||
}
|
||||
|
||||
@@ -390,10 +413,10 @@ export function checkRootManifest(rootDir) {
|
||||
failures.push(`${relativePath}: missing required script "start"`);
|
||||
} else {
|
||||
const startCommand = manifest.scripts.start;
|
||||
if (startCommand === "pnpm --filter @toolctrl/web start") {
|
||||
passes.push(`${relativePath}: production start script delegates to @toolctrl/web`);
|
||||
if (startCommand === "pnpm --filter @hivegrid/web start") {
|
||||
passes.push(`${relativePath}: production start script delegates to @hivegrid/web`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: script "start" must delegate to @toolctrl/web`);
|
||||
failures.push(`${relativePath}: script "start" must delegate to @hivegrid/web`);
|
||||
}
|
||||
|
||||
if (/\btsx\b/.test(startCommand)) {
|
||||
@@ -534,21 +557,21 @@ export function checkDockerfileWebContract(rootDir) {
|
||||
}
|
||||
|
||||
if (WEB_BUILD_TARGET_PATTERN.test(dockerfile) && webBuildBody && WEB_BUILD_COMMAND_PATTERN.test(webBuildBody)) {
|
||||
passes.push(`${relativePath}: web-build target runs only @toolctrl/web build`);
|
||||
passes.push(`${relativePath}: web-build target runs only @hivegrid/web build`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: must define web-build target from build and run pnpm --filter @toolctrl/web build`);
|
||||
failures.push(`${relativePath}: must define web-build target from build and run pnpm --filter @hivegrid/web build`);
|
||||
}
|
||||
|
||||
if (API_BUILD_TARGET_PATTERN.test(dockerfile) && apiBuildBody && API_BUILD_COMMAND_PATTERN.test(apiBuildBody)) {
|
||||
passes.push(`${relativePath}: api-build target runs only @toolctrl/api build`);
|
||||
passes.push(`${relativePath}: api-build target runs only @hivegrid/api build`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: must define api-build target from build and run pnpm --filter @toolctrl/api build`);
|
||||
failures.push(`${relativePath}: must define api-build target from build and run pnpm --filter @hivegrid/api build`);
|
||||
}
|
||||
|
||||
if (WORKER_BUILD_TARGET_PATTERN.test(dockerfile) && workerBuildBody && WORKER_BUILD_COMMAND_PATTERN.test(workerBuildBody)) {
|
||||
passes.push(`${relativePath}: worker-build target runs only @toolctrl/worker build`);
|
||||
passes.push(`${relativePath}: worker-build target runs only @hivegrid/worker build`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: must define worker-build target from build and run pnpm --filter @toolctrl/worker build`);
|
||||
failures.push(`${relativePath}: must define worker-build target from build and run pnpm --filter @hivegrid/worker build`);
|
||||
}
|
||||
|
||||
if (
|
||||
@@ -708,7 +731,7 @@ export function checkDockerfileWorkerContract(rootDir) {
|
||||
}
|
||||
|
||||
if (workerBody && WORKER_RUNTIME_PATTERN.test(workerBody)) {
|
||||
passes.push(`${relativePath}: worker runtime invokes @toolctrl/worker production start path`);
|
||||
passes.push(`${relativePath}: worker runtime invokes @hivegrid/worker production start path`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: worker target must invoke node apps/worker/dist/index.js directly`);
|
||||
}
|
||||
@@ -762,7 +785,7 @@ export function checkDockerfileApiContract(rootDir) {
|
||||
}
|
||||
|
||||
if (apiBody && API_RUNTIME_PATTERN.test(apiBody)) {
|
||||
passes.push(`${relativePath}: api runtime invokes @toolctrl/api production start path`);
|
||||
passes.push(`${relativePath}: api runtime invokes @hivegrid/api production start path`);
|
||||
} else {
|
||||
failures.push(`${relativePath}: api target must invoke node apps/api/dist/server.js directly`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user