Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions examples/openui-chat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ COPY pnpm-workspace.yaml package.json pnpm-lock.yaml tsconfig.json ./
COPY packages/openui-cli/package.json ./packages/openui-cli/
COPY packages/react-ui/package.json ./packages/react-ui/
COPY packages/react-headless/package.json ./packages/react-headless/
COPY packages/lang-core/package.json ./packages/lang-core/
COPY packages/react-lang/package.json ./packages/react-lang/
COPY examples/openui-chat/package.json ./examples/openui-chat/

Expand All @@ -26,20 +27,20 @@ RUN --mount=type=cache,id=pnpm-store,target=/root/.local/share/pnpm/store \
COPY packages/openui-cli ./packages/openui-cli
COPY packages/react-ui ./packages/react-ui
COPY packages/react-headless ./packages/react-headless
COPY packages/lang-core ./packages/lang-core
COPY packages/react-lang ./packages/react-lang
COPY examples/openui-chat ./examples/openui-chat

RUN pnpm --filter @openuidev/cli build
RUN pnpm --filter @openuidev/react-ui build
RUN pnpm --filter @openuidev/react-headless build
RUN pnpm --filter @openuidev/lang-core build
RUN pnpm --filter @openuidev/react-lang build

WORKDIR /app/examples/openui-chat
RUN node /app/packages/openui-cli/dist/index.js generate src/library.ts --out src/generated/system-prompt.txt \
&& pnpm build



# --------------------------------------------------
# Runtime stage
# --------------------------------------------------
Expand All @@ -55,7 +56,7 @@ ENV PORT=3000 HOSTNAME=0.0.0.0

RUN addgroup -S nodejs && adduser -S nextjs -G nodejs
USER nextjs

# Copy full standalone output to avoid brittle partial-copy assumptions
COPY --from=builder --chown=nextjs:nodejs /app/examples/openui-chat/.next/standalone ./

Expand All @@ -70,4 +71,4 @@ EXPOSE 3000
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:3000').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"

CMD ["node", "examples/openui-chat/server.js"]
CMD ["node", "examples/openui-chat/server.js"]
Loading