This code dockerizes the candis app completely . Now with the help of only two commands anyone can setup the candis app on their local system and start contributing to our app. Apart from development, the dockerization has been divided for production as well.
Requirements files has been divided seperately for development and production with development dependencies including both the requirements file.
Then two seperate dockerfiles has been written seperately for dev and prod . Development docker file uses the concept of volumes so that the changes done in the local are reflected back in the container as well. On the other hand production dockerfile uses copy the candis code into the container to ensure immutability and reproducibility.
Then I seperated the docker-compose files for both .
Screenshots/GIFs:
Screenshot
Steps To Test:
Use docker-compose -f development.yml build to build the docker image for development and then use
docker-compose -f development.yml up to start the container.
Use docker-compose -f production.yml build to build the docker image for production and then use
docker-compose -f production.yml up to start the container for the production stage.
Explanation About What Code Achieves:
Screenshots/GIFs:
Steps To Test:
docker-compose -f development.yml build
to build the docker image for development and then usedocker-compose -f development.yml up
to start the container.docker-compose -f production.yml build
to build the docker image for production and then usedocker-compose -f production.yml up
to start the container for the production stage.TODOs: