Thank you for this excellent writeup. I have a question, I built a React app using Express/Mongo/React/Node and I am using 'concurrently'. As you said, I have a messy root folder because my Express server.js file is in the root of my project and the React app resides in the 'client' folder inside the root. I would like to Dockerize this project using your approach which will separate everything and allow me to use the docker-compose.yml to combine everything. I am new to Docker and I was wondering what is the best method for me to start going about Dockerizing this project since it is ready to be deployed in its current state. It seems as though you have quite a bit of knowledge with this procedure.
If you don't know docker then don't introduce any docker stuff in your app. If ain't broke, don't fix it 😊. You should first learn good amount of docker. Bcz sometimes docker can be your enemy.
If you know docker then,
First step would be to strip out any concurrently stuff.
Optional but if you want a nice folder structure then you should look at yarn workspaces
If your app is open source I would be very happy to contribute 🤞🏻.
And I promise, learning docker will be a big plus for you.
Thank you very much for your reply Vikas! It is a personal project and I am just launching an early alpha to test functionality, so that is why I was considering dockerizing it. Both to force me to learn docker and also to help in the deployment. I will probably do as you said and not use it for this project and I will wait for another project and then use docker from the beginning.
Hi Vikas,
Thank you for this excellent writeup. I have a question, I built a React app using Express/Mongo/React/Node and I am using 'concurrently'. As you said, I have a messy root folder because my Express server.js file is in the root of my project and the React app resides in the 'client' folder inside the root. I would like to Dockerize this project using your approach which will separate everything and allow me to use the docker-compose.yml to combine everything. I am new to Docker and I was wondering what is the best method for me to start going about Dockerizing this project since it is ready to be deployed in its current state. It seems as though you have quite a bit of knowledge with this procedure.
Thanks in advance!
Stephen
If you don't know docker then don't introduce any docker stuff in your app. If ain't broke, don't fix it 😊. You should first learn good amount of docker. Bcz sometimes docker can be your enemy.
If you know docker then,
First step would be to strip out any concurrently stuff.
Optional but if you want a nice folder structure then you should look at yarn workspaces
If your app is open source I would be very happy to contribute 🤞🏻.
And I promise, learning docker will be a big plus for you.
Thank you very much for your reply Vikas! It is a personal project and I am just launching an early alpha to test functionality, so that is why I was considering dockerizing it. Both to force me to learn docker and also to help in the deployment. I will probably do as you said and not use it for this project and I will wait for another project and then use docker from the beginning.
Thank you very much for your input!
Stephen
It is really nice thing that you want to force yourcelf to learn docker. I really appreciate that.
And you can definitely dockerize your current app. You just have learn enough to get yourself a start. And make mistake.
Then you can later improvize on that learnings and mistakes. It the same how i did it.