To learn how to dockerize a MERN app and ensure their communication
Now everything works smoothly.
This is just the begining.
I will make a complex version.
You can see all my learnings at
Everything which needed attention is written here.
Feel free to ask, suggest or comment anything about this project in the issues
I am leaving it as it is for now.
It will work as a reference for me and my juniors.
No discrimination even Seniors can read and be benifited LOL ; )
You may want to use it as a base for your full stack project.
With this project you can skip the DevOPS part.
I know learning is important. But it takes effort and time
Its a quickle which will get you going.
- Changing the database and the
MONGO_URI
in thedocker-compose.yaml
- You may want to change the ports in the
docker-compose.yaml
or thenginx/default.conf
- Thats it and its ready to build quick and ensure the connectivity.
- You may want to change the
MONGO_URI
and add the db at the end of the url.
DOCKER WAY
-
Clone this repo
git clone https://github.com/OAtulA/Mern-on-docker.git
-
Go to the root directory and run
docker-compose up --build
or if you have the latest docker it's nowdocker compose up --build
-
Go to http://localhost:3050
but ensure you have at least this much space.
I mean even if you run it on a 16GB pendrive Linux live USB. It will work.
docker images | grep mern
mern-on-docker-chatf latest 5dd0782873b6 27 minutes ago 1.21GB
mern-on-docker-client latest 714374fc7c04 36 minutes ago 187MB
mern-on-docker-nginx latest 6f1762b966d6 About an hour ago 187MB
mern-on-docker-api latest 49041d0764df 2 hours ago 1.17GB