Files
multica/Dockerfile.web
Bohan Jiang 0314df3b8e docs(license): widen the branding condition to all UI code and add NOTICE (MUL-5558) (#6197)
* docs(license): widen the branding condition to all UI code and add NOTICE (MUL-5558)

The branding condition in 1b defined Multica's "frontend" as `apps/web/`
only, which left the code that actually renders the console brand outside
its own scope: the sidebar, invite and new-workspace brand surfaces live in
`packages/views/`, and the Electron and iOS clients mount the whole console
from `@multica/views` without touching `apps/web/`. A rebranded desktop
build could therefore satisfy the condition literally while removing every
Multica mark.

Replace the directory-enumerated "frontend" with a derivation-based
"Multica user interface" covering `apps/web/`, `apps/desktop/`,
`apps/mobile/`, `packages/views/` and `packages/ui/` across source, the
Docker "web" image, and compiled desktop/mobile binaries. Keep the
non-interface exemption so backend-only use stays governed by 1a rather
than by branding, and add 1c so that path still carries attribution.

Add a NOTICE file to give the attribution obligation somewhere to land:
the repository had none, and no per-file copyright headers, so Apache 2.0
section 4(c)/(d) had nothing to reproduce.

Move the "commercial license must be obtained" sentence into 1a, since it
describes only that condition and 1b/1c are cured by written authorization
and attribution respectively, not by purchase.

Co-authored-by: multica-agent <github@multica.ai>

* docs(license): separate the commercial license from the branding waiver (MUL-5558)

Conditions (a) and (b) were both cured by "explicitly authorized by
Multica in writing", so one authorization letter could be read as
releasing both — handing over commercial hosting rights when only a
rebranding permission was intended.

Name the two grants distinctly: (a) is cured only by a commercial license
obtained from the producer, (b) only by a written branding waiver. Add (d)
stating that neither implies the other and that neither can be inferred
from the producer's silence or from acceptance of contributions.

Co-authored-by: multica-agent <github@multica.ai>

* docs(license): name the published frontend image and cover relocated UI code (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* chore(docker): ship LICENSE and NOTICE in the published images (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* docs(readme): add bilingual License sections matching the updated conditions (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* docs(license): reposition as the self-contained, source-available Multica License (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* chore(release): align license metadata and ship NOTICE in release artifacts (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* docs(readme): describe Multica as source-available and add contribution terms (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* fix(landing): describe Multica as source-available instead of open source (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

* revert(license): keep the Dify-style open-source framing, scope widening only (MUL-5558)

Co-authored-by: multica-agent <github@multica.ai>

---------

Co-authored-by: Bohan-J <bohan@devv.ai>
Co-authored-by: multica-agent <github@multica.ai>
2026-07-30 21:18:59 +08:00

79 lines
2.5 KiB
Docker

# --- Dependencies ---
FROM node:22-alpine AS deps
WORKDIR /app
# Copy workspace config and all package.json files for dependency resolution
COPY pnpm-lock.yaml pnpm-workspace.yaml package.json turbo.json .npmrc ./
COPY apps/web/package.json apps/web/
# postinstall runs fumadocs-mdx which reads apps/web/source.config.ts
COPY apps/web/source.config.ts apps/web/source.config.ts
COPY packages/core/package.json packages/core/
COPY packages/ui/package.json packages/ui/
COPY packages/views/package.json packages/views/
COPY packages/tsconfig/package.json packages/tsconfig/
COPY packages/eslint-config/package.json packages/eslint-config/
RUN corepack enable && \
PNPM_VERSION="$(node -p 'require("./package.json").packageManager')" && \
corepack prepare "$PNPM_VERSION" --activate
RUN pnpm install --frozen-lockfile
# --- Build ---
FROM node:22-alpine AS builder
WORKDIR /app
# Activate the same pnpm version declared by the repository before the
# offline frozen install validates package-manager metadata in pnpm-lock.yaml.
COPY package.json ./
RUN corepack enable && \
PNPM_VERSION="$(node -p 'require("./package.json").packageManager')" && \
corepack prepare "$PNPM_VERSION" --activate
# Copy installed dependencies (preserves pnpm symlink structure)
COPY --from=deps /app ./
# Copy source
COPY package.json turbo.json pnpm-workspace.yaml ./
COPY apps/web/ apps/web/
COPY packages/ packages/
# Re-link after source overlay (fixes any symlinks overwritten by COPY)
RUN pnpm install --frozen-lockfile --offline
ARG NEXT_PUBLIC_APP_VERSION=dev
ENV NEXT_PUBLIC_APP_VERSION=$NEXT_PUBLIC_APP_VERSION
ENV STANDALONE=true
# Build the web app (standalone output for minimal runtime)
RUN pnpm --filter @multica/web build
# --- Runtime ---
FROM node:22-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV REMOTE_API_URL=http://backend:8080
RUN addgroup --system --gid 1001 nodejs && \
adduser --system --uid 1001 nextjs
# Copy standalone output (includes traced node_modules)
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/standalone ./
# Copy static files (not included in standalone)
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/.next/static ./apps/web/.next/static
# Copy public assets
COPY --from=builder --chown=nextjs:nodejs /app/apps/web/public ./apps/web/public
# Ship the license and attribution notices with the image (LICENSE condition 1b)
COPY --chown=nextjs:nodejs LICENSE NOTICE ./
USER nextjs
EXPOSE 3000
ENV PORT=3000
ENV HOSTNAME=0.0.0.0
CMD ["node", "apps/web/server.js"]