Multi-tenant digital menu platform (Collina Systems): public QR menu with glassmorphism + 3D macro flip cards, mobile-first editor with draft/publish versioning (5-version history + restore), AI consultant & translation (Claude Haiku), realtime orders via SSE, configurable palette, QR generation, superadmin panel, and Docker/Coolify infra.
42 lines
1.2 KiB
Docker
42 lines
1.2 KiB
Docker
# --- deps ---
|
|
FROM node:20-alpine AS deps
|
|
RUN apk add --no-cache libc6-compat openssl
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json* ./
|
|
RUN npm ci
|
|
|
|
# --- builder ---
|
|
FROM node:20-alpine AS builder
|
|
RUN apk add --no-cache libc6-compat openssl
|
|
WORKDIR /app
|
|
COPY --from=deps /app/node_modules ./node_modules
|
|
COPY . .
|
|
RUN npx prisma generate
|
|
RUN npm run build
|
|
|
|
# --- runner ---
|
|
FROM node:20-alpine AS runner
|
|
RUN apk add --no-cache libc6-compat openssl
|
|
WORKDIR /app
|
|
ENV NODE_ENV=production
|
|
ENV PORT=3000
|
|
|
|
# Standalone output bundles only what's needed to run.
|
|
COPY --from=builder /app/public ./public
|
|
COPY --from=builder /app/.next/standalone ./
|
|
COPY --from=builder /app/.next/static ./.next/static
|
|
|
|
# Prisma needs the schema + engine + CLI to run migrate deploy at startup.
|
|
COPY --from=builder /app/prisma ./prisma
|
|
COPY --from=builder /app/node_modules/.bin/prisma ./node_modules/.bin/prisma
|
|
COPY --from=builder /app/node_modules/prisma ./node_modules/prisma
|
|
COPY --from=builder /app/node_modules/@prisma ./node_modules/@prisma
|
|
COPY --from=builder /app/node_modules/.prisma ./node_modules/.prisma
|
|
|
|
COPY docker-entrypoint.sh ./docker-entrypoint.sh
|
|
RUN chmod +x docker-entrypoint.sh
|
|
|
|
EXPOSE 3000
|
|
VOLUME ["/data"]
|
|
CMD ["./docker-entrypoint.sh"]
|