mirror of
https://github.com/open-reception/appointment-booking-software.git
synced 2026-08-17 21:25:52 +02:00
Fix ci build by making DATABASE_URL optional during build
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ ENV NODE_ENV=production
|
||||
|
||||
# Copy source and build
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
RUN BUILDING=true npm run build
|
||||
|
||||
# Production stage
|
||||
FROM node:24-alpine AS production
|
||||
|
||||
@@ -6,7 +6,9 @@ import { env } from "$env/dynamic/private";
|
||||
import type { PostgresJsDatabase } from "drizzle-orm/postgres-js";
|
||||
import { eq } from "drizzle-orm";
|
||||
|
||||
if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set");
|
||||
if (!process.env.BUILDING && !env.DATABASE_URL) {
|
||||
throw new Error("DATABASE_URL is not set");
|
||||
}
|
||||
|
||||
// Central database connection for tenant management
|
||||
const centralClient = postgres(env.DATABASE_URL);
|
||||
|
||||
@@ -11,7 +11,9 @@ import { z } from "zod";
|
||||
import { ConflictError, NotFoundError, ValidationError } from "../utils/errors";
|
||||
import { redactDbUrl } from "../utils/url";
|
||||
|
||||
if (!env.DATABASE_URL) throw new Error("DATABASE_URL is not set");
|
||||
if (!process.env.BUILDING && !env.DATABASE_URL) {
|
||||
throw new Error("DATABASE_URL is not set");
|
||||
}
|
||||
|
||||
const tenantCreationSchema = z.object({
|
||||
shortName: z
|
||||
|
||||
Reference in New Issue
Block a user