You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 that web 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
Have I been barking-up the wrong tree?
What's the best practice here?
When I find an answer, I'll publish an example repo so nx neebies like me can learn too.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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