Skip to content

fix: Dockerfile for openui-chat with pnpm workspace support#370

Merged
zahlekhan merged 4 commits intothesysdev:mainfrom
shogun444:fix/docker-pnpm-workspace
Mar 24, 2026
Merged

fix: Dockerfile for openui-chat with pnpm workspace support#370
zahlekhan merged 4 commits intothesysdev:mainfrom
shogun444:fix/docker-pnpm-workspace

Conversation

@shogun444
Copy link
Copy Markdown
Contributor

Fix Docker build for pnpm monorepo workspace

The previous Docker setup failed in monorepo builds due to pnpm workspace dependency resolution and runtime path mismatches. This update makes the Docker workflow reliable for the openui-chat example.

Fixes

  • Uses monorepo root build context with -f examples/openui-chat/Dockerfile
  • Correctly installs pnpm workspace dependencies during image build
  • Avoids global CLI lookup by invoking the built OpenUI CLI directly
  • Uses Next.js standalone output for production runtime
  • Aligns runtime paths with verified container output:
    • examples/openui-chat/server.js
    • examples/openui-chat/.next/static

Validation

  • docker build -f examples/openui-chat/Dockerfile -t openui-chat . succeeds
  • Container starts successfully on port 3000
  • A 401 response is expected when using a placeholder OPENAI_API_KEY (runtime is healthy)

Usage

docker build -f examples/openui-chat/Dockerfile -t openui-chat .
docker run --rm -p 3000:3000 -e OPENAI_API_KEY=your_api_key openui-chat

@shogun444 shogun444 force-pushed the fix/docker-pnpm-workspace branch from b4eabcf to 53ae5ac Compare March 21, 2026 08:29
@shogun444 shogun444 closed this Mar 21, 2026
@shogun444 shogun444 force-pushed the fix/docker-pnpm-workspace branch from 53ae5ac to daad1bc Compare March 21, 2026 08:35
@shogun444 shogun444 reopened this Mar 21, 2026
@shogun444
Copy link
Copy Markdown
Contributor Author

Hi @zahlekhan, I’ve pushed a small update to address the runtime issue.

Re-tested from a fresh clone — Docker build and run both work as expected.

Would appreciate your review when you get time.

@shogun444 shogun444 mentioned this pull request Mar 22, 2026
@zahlekhan
Copy link
Copy Markdown
Contributor

@shogun444 this looks good. Nice work.
One minor issue, the dockerfile expect the host working directory to be the repository root, can you make it ./examples/openui-chat

@shogun444
Copy link
Copy Markdown
Contributor Author

Hi @zahlekhan ,

Thanks for the suggestion!

Updated the setup so it can be run from examples/openui-chat as well as from the repository root. I’ve also clarified the build context requirement in the README and added examples for both workflows.

Tested both approaches locally both work as expected. Let me know if you'd like any further tweaks.

@zahlekhan zahlekhan enabled auto-merge (squash) March 24, 2026 14:54
@zahlekhan zahlekhan merged commit bf93311 into thesysdev:main Mar 24, 2026
1 check passed
@shogun444
Copy link
Copy Markdown
Contributor Author

Hi @zahlekhan,

Thanks for reviewing and merging the PR!

The Docker support for openui-chat has now been merged via PR #370. Could you please let me know how to claim the bounty for this issue?

Thanks!

@zahlekhan
Copy link
Copy Markdown
Contributor

As a token of our appreciation for your contribution, we’re happy to award you $10.

To receive your payment, please create an account at https://algora.io/ and connect your bank account. Once it is set up, we will proceed with the transfer.

If you encounter any issues during the process, feel free to reach out. We are happy to help.

@shogun444
Copy link
Copy Markdown
Contributor Author

Hello,

Thanks a lot! I’ve created my account on Algora and completed the setup.

Please let me know if anything else is needed from my side.

Thanks again!

@zahlekhan
Copy link
Copy Markdown
Contributor

zahlekhan commented Mar 24, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants