fix: update Dockerfile to use npm ci --production and enhance panel API error handling
This commit is contained in:
parent
9314026817
commit
5a3fcba130
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue