-
Notifications
You must be signed in to change notification settings - Fork 2.4k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DISCUSSION]: deploying an NX monorepo, CI/CD and documentation. #3929
Comments
Hello! Any update on this? |
No, I was hoping for some discussion with the community. I have got mine deploying via circle ci to heroku for the nestjs api and netlify for the angular front end but it feels a little hacky. |
Thank you for your response. I tried deploying my express app to Heroku but the main issue is that we don't have a |
My current approach is to send the whole NX project to Heroku and then Taylor the build and deploy npm commands to only deploy the nest backend |
I also do the same thing but it's just CI/CD commands stacked together just to deploy and this whole process feels wrong for some reason because if any update and symlinks are added to the project, this whole chain won't work anymore and we have to write another stack of CI/CD. Hopefully, we find a real solution soon because this project has increased our productivity so much and it's such a shame if we cannot deploy stuff properly. |
If I'm not mistaken, a similar pain point was raised in this issue #3817 |
Yes. Unfortunately that's the same issue. |
I too am trying to use nx with Heroku and running into issues. So far im trying to follow this guide which basically involves building docker first then pushing to heroku: https://hackmd.io/US2eky6lSMecuHxegFZCbA?view but it doesnt seem to work for me Just a quick edit I was able to follow a suggestion on this discussion: #1777 which mentioned using https://github.com/vercel/ncc which seems to work pretty well |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Is there any example of guidance here by nrwl on how to deploy these apps? |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
a reply from a maintainer with their recommendations would be great |
any update on it? |
Some best practices or some basic guidance would be nice here :) |
I ended up deploying the front-end to Netlify and the back-end to Heroku off of the same repo. Basically, configure two different commands in
The back-end APIs were:
Depending on where you host your FE or BE, you may have to edit your boot files (e.g., for Heroku it was |
Is there any documentation with an example how to deploy Nextjs application under NX workspace to Netlify? |
Waiting for CI/CD integration.I had the same, question, I really love the structure of NX, and i think is a impressive tool, but I'm trying to include three different front-end projects, which I am have the deploys through circleci, directly to S3, using the feature static sites from AWS, the three front-end projects are working with similar components and look and feel, all projects are reactJS applications, but is really necessary to include the continues integration. @johnaagudelo0820 |
Same problem over here ☝️I try to provision different systems via gitlab ci, and it would be awesome to have some best practice documented. All I can, I'm able to find, seems kinda hacky and unreliable. If there's someone interested, I would be happy to help and share my experiences. |
Same here! I was able to setup CD to Kubernetes with Helmfile and GitHub Actions. If there is a place for it, I would be happy to share. |
A description and a link to a gist/repo would be great! |
I copy-pasted the relevant files and part of the workspace.json into a gist. Will provide a full repo when I find some time. 👍 https://gist.github.com/steinroe/4628bcf86c8ca24279b2a57663088659 |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
It would be good for a maintainer to weigh in and give their opinion
… On 20 Jul 2021, at 01:04, github-actions[bot] ***@***.***> wrote:
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs.
If we missed this issue please reply to keep it active.
Thanks for being a part of the Nx community! 🙏
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I had the same problem and solved it with a custom repository for every app distribution/drop. The problem with heroku specific files like Procfile or the engine in package.json are solved with a custom executor: Maybe this solution helps people who are struggling with the same problems. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
This issue is still relevant and should still be open. |
+1 |
Agreed with the above. I'm having a lot of trouble running |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
Up |
Hi CristanPerez. Do you find any solution about your scenario? i want to migrate to nx workspace but i thing I'll have the same problem you have, how to config CI CD to each of my app to diferents domains inside AWS S3. |
We gave up on nx alone and instead use npm workspaces + nx (buildable + publishable). External packages are installed using npm workspace for each project which ensured each projects package.json contains all external dependencies needed. This gets copied to dist folder on build as well as packaged during cd. This is the only way I have found it to be sane. Anything else without a tailed package.json for each deployable project will bloat your deployment with a bunch of dependencies that application doesn't need. You will find a decent amount of close tickets like this with no clear direction from the Nx team which is disappointing but its open source so ..... Even Nx's own projects have their own package.json with their dependencies. See https://github.com/nrwl/nx/tree/master/packages/tao, https://github.com/nrwl/nx/tree/master/packages/node and others. In short, npm/yarn workspaces + Nx (buildable + publishable) will make your life easier than just Nx. |
This issue has been automatically marked as stale because it hasn't had any recent activity. It will be closed in 14 days if no further activity occurs. |
I just containerize nest applications with the "@nx-tools/nx-docker:build" executer. Then i deploy that container to aws ecs. Its works really well! This will deploy any app i want with docker. The only requirement is that it needs to have some sort of server, like express or i use nestjs. You can also use nginx, but at that point, just use netlify. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Description
Having a read though the documentation there seems to be a real lack of examples and best practices on how to deploy your shiny new project and searching around for articles is a sea of outdated or hacky looking workarounds.
I would like to discuss how the community is deploying their repos and some best practice input from the Dev team and then either help write some docs or at least curate them into an article. I am really enjoying developing with nx but I find the docs lacking.
A secondary thing would be some examples of CI/CD configs for the main providers for different configs.
Lastly, is there a NestJS version of these angular.json deployers
Suggested areas of documentation
preparing to deploy
Configuring the deployer
running your first deploy
NX CICD Pipeline by example
The text was updated successfully, but these errors were encountered: