fix: update Dockerfile to use npm ci --production and enhance panel API error handling

This commit is contained in:
Marco Pedone 2025-08-07 16:02:55 +02:00
parent 9314026817
commit 5a3fcba130
2 changed files with 4 additions and 1 deletions

View file

@ -6,7 +6,7 @@ FROM base AS deps
RUN apk add --no-cache libc6-compat openssl
WORKDIR /app
COPY package*.json package-lock.json* ./
RUN npm ci
RUN npm ci --production
# Builder stage
# This stage is used to build the application

View file

@ -4,6 +4,9 @@ import { env } from "~/env.mjs";
import { appRouter } from "~/server/api/root";
export default async function handler(_: NextApiRequest, res: NextApiResponse) {
if (env.NODE_ENV !== "development") {
return res.status(404).send("Not Found");
}
if (!env.NEXT_PUBLIC_BASE_URL.includes("localhost")) {
return res.status(404).send("Not Found");
}