it has a client and server made using react and express respectively
- we created dockerfiles for both client and server
- we created a .dockerignore files for both as well
- we created a docker-compose yml file , that simultanouesly builds both the images in one go , rather than us manually running docker build to build both the images and runs their container as well
- docker-compose up --build : automates both the steps --build : builds the image for client and server up : runs the container for their images
- docker-compose down : stops and removes the containers
- we created two dockerfiles (one for prod and one for dev)
- in prod dockerfile , we used mutli image staging
- we added healthcheckup which checks if the server is running healty every 5 seconds
- added proxy for api calling in frontend
- modified docker-compose file to include mongo service
- made changes in codebase to save edit and delete todo from a database named todos in mongodb
- no more localstorage setup - all data now persists in MongoDB
- screenshot of how to see the database in terminal:
- or else open the mongo compass GUI
docker-compose up --build : rebuilds the same image and runs container docker-compose : also rebuilds the same image after reading docker-compose.yml file docker-compose down : stops and deletes the container from running , doesnt delete the image but image name is based on the format :/ (see in docker desktop)
