Closed gawandeabhishek closed 3 months ago
Name | Link |
---|---|
Latest commit | a06528c884fcbffacafdecdb6264fda3bad01e31 |
Latest deploy log | https://app.netlify.com/sites/creativecommons-chooser/deploys/661050679f8ef20008ad7648 |
Deploy Preview | https://deploy-preview-517--creativecommons-chooser.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
I'm delighted to hear that! It was my pleasure to contribute.
Fixes
Description
My pull request dockerizes the Creative Commons Chooser repository. This helps developers avoid downgrading their Node.js version to 14 or below. If we do so, we encounter errors when installing packages via npm because if the version is 5 or something similar of npm, it will give an error. Therefore, to make it easier for contributors to contribute, it is advisable to start and run the application using Docker.
Technical details
I have added two files:
Dockerfile
anddocker-compose.yml
.In Dockerfile, it creates an image and a separate Operating system for running the app. It allows us to use any version with any combination of versions of Node.js and npm, etc.
The docker-compose file composes commands and then runs them in sequence. If the code requires a certain command, for example, if we haven't installed any package, then 'npm install' will not run again. It will only run when we add or remove any package. If we add or delete any package in our project, then the 'npm install' command and the subsequent commands will rerun. Thus, we need to carefully write the sequence of commands, which I have done in this PR. Finally, by running the single command 'docker-compose up', our website will be live. However, the condition is that we should have Docker Desktop installed on our machine, which will create containers and images.
Tests
Install Docker from the official Docker website (Get Started | Docker) and then, after setting up Docker, run this command in the chooser folder:
docker-compose up
.Checklist
Update index.md
).main
ormaster
).Developer Certificate of Origin
For the purposes of this DCO, "license" is equivalent to "license or public domain dedication," and "open source license" is equivalent to "open content license or public domain dedication."