feat(monorepo): add Docker support docs and update templates for shadcn/ui monorepo #6562
+163
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've been using the monorepo setup for a while now and thought it would be helpful to add Docker support to speed up project spin-up. This PR introduces experimental Docker documentation and updates the template files to simplify building and running a shadcn/ui monorepo project in Docker.
What’s Included
Docker Support in Docs:
A new "Docker Support" section has been added to
monorepo.mdx
. It outlines the prerequisites (like having Docker installed), explains how to configure Next.js for a standalone build, and provides the commands to build and run the image.Updated README:
The monorepo template README now includes a Docker section with a quick-start guide.
New Dockerfile:
A Dockerfile for the web workspace (
apps/web/Dockerfile
) has been added, which uses a multi-stage build to ensure a small and secure runtime image extended from the Turborepo Docker docs.docker-compose.yml:
A new docker-compose file (
docker-compose.yml
) is included to simplify deployment.Next.js Config Reminder:
A note in
next.config.mjs
reminds users to uncomment the standalone output line when using Docker.All changes have been tested.
Why This?
Previously, running a monorepo project in Docker required manual tweaking. This update might streamline the process, reducing hassle—especially for self-hosting setups. Since this support is experimental, any feedback or suggestions are more than welcome!