-
-
Notifications
You must be signed in to change notification settings - Fork 728
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
Best way to install yarn and nodejs #497
Comments
I can offer my version, how I implemented it in my project. Since we only need nodejs to minify and package assets, we don't need to create a separate service in production mode, so let's add a service for developer mode, for this, add the following service to the
After that, run your docker compose and you will have a new By the way, to deploy assets in production mode, you can use the
|
Hey, thank you for your help. I don't know if this the best pratice but I added in the dockerfile :
|
This is a bad practice because each container should be responsible for only one dependency (in this case, you have php and node in the same container). If you need to customize the node service, then you need to create a separate container for this, I recommend following the official guide. |
Hello, Thanks for your quick reply. Indeed, It wasn't the best option. On the old project I'm working on, they installed node with apt-get in the PHP image. I followed your example. Thanks for sharing code. |
Hi !
Thank you for this great job! It's really great.
I want to install nodejs and yarn in docker.
What's the best way to do it ?
It would be great to have symfony/webpack-encore-bundle in Extra Services.
There is an issue on this topic but i don't know if it's the right method. The dockerfile is different.
Thank you for your help.
The text was updated successfully, but these errors were encountered: