Replies: 1 comment 1 reply
-
@mmmoli same question, have you figured out a proper way to do this? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
I’m working on a project where I use NX to manage a monorepo with a Remix app (
web
) and a library (design-system
) that it depends on. I'm deploying the app using Docker and hosting it on Fly.io, and I’ve been exploring the best way to handle the build process for this setup.Context
Monorepo Structure:
apps/web
: The main Remix app.libs/design-system
: A shared library thatweb
depends on.Build Process: The app needs to be built with the library’s code included, so both the app and its dependencies are fully compiled within the container.
The main challenge I've come-up against, while create a Docker build process is Dependency Management: Ensuring that web has access to the latest build of design-system within the Docker container.
What I've Tried:
Building Locally and Copying Artifacts: Attempted building the app locally and copying the build output into the Docker container. However, dependencies for
design-system
were missing when I ran the container and I was worried about how particular binaries might work.Multi-Stage Docker Builds: Bringing the entire workspace into the container and using nx commands to build and run the app. This felt bloated and the build step of the Remix app failed.
Questions
When I find an answer, I'll publish an example repo so nx neebies like me can learn too.
Beta Was this translation helpful? Give feedback.
All reactions