frontend: Dockerfile removes conflicting [slug] route at build time

This commit is contained in:
2026-05-07 03:31:06 +00:00
parent ae2b22ddb3
commit 3483c9d9bc
+6 -3
View File
@@ -1,8 +1,11 @@
FROM node:20-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY package.json ./
RUN npm install
COPY . .
RUN mkdir -p public
# Remove conflicting dynamic route — routes handled by [brand_slug]/
RUN rm -rf src/app/dashboard/\[slug\]
RUN npm run build
FROM node:20-alpine AS runner
@@ -10,6 +13,6 @@ WORKDIR /app
ENV NODE_ENV=production
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
COPY --from=builder /app/public ./public
RUN mkdir -p public
EXPOSE 3000
CMD ["node", "server.js"]