8/31/2023 0 Comments Pnpm workspace monorepo![]() ![]() We only want peer deps that are used by packages in our partial repo tree. If there is a large peer dep required by only two packages, it will be in the root package, and included in every Docker image. Perf - prevent all root package dependencies ( node_modules) being included in every service build peer deps Is there any point running a server now that we have shared-workspace-shrinkwrap?.Could -use-store-server speed up multiple Docker installs? Can a server be shared outside of a Docker container?.Can we use our existing babel (and other) caches in node_ should we force a rebuild just to be safe.(If you provide a path like docker build. docker build accepts a tar as a context.If I have 100 services, the file copying could be slow and take up a lot of space because we need 100 temp dirs.This dir should be inspectable because if a dependency is not defined correctly, the user will need to look into this dir to find out what is missing.docker-trees), filtering out any packages not in this service's dependency tree. Find all dependencies which are monorepo packages.For all services that need to be rebuilt.it is a deployable service), mark it as needing to be rebuilt. If a dependent package has a Dockerfile in its root directory (i.e.The root package should use the files prop to define all files that are needed for a full build. Need to include the babel cache key in the decision to rebuild a package or not. If I change the root, every file will need rebuilding. ![]() NOTE: Need to make sure all dependencies are explicitly defined.For every modified file, find its containing package (find up package.json).Work out what has changed using git diff.Goal: Only build the services whose dependencies have changed. PlanĪssumption: You don't care about publishing packages to npm during a deploy. Hopefully when I'm done we can have a recipe for how to deploy a monorepo containing multiple services sharing multiple packages as separate Docker images that build quickly after changes are made, and are lightweight. I'm starting work on Dockerizing my pnpm monorepo. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |