You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve Dockerfile: dependencies are installed within with hard-coded versions #154
This is unsustainable, every time we make a change into the codebase by adding a new Python dependency, we have to also update requirements file and also Dockerfile. This is and will be source of problems. Besides, it's not common practice and it leads us to have different env on localhost, CI, CD, and dockerfile / production.
The solution is to:
Split the current requirements.txt file into two: requirements.txt (containing depenendies needed for production run of the application) and requirements-dev.txt (containing dependencies needed for CI and tests only - things like black, pytest, pylint etc)
Install the requirements.txt only from within the Dockerfile by verifying that the copy of this file exists on the docker image and that something like pip install -r requirements.txt is executed
Also, make sure that requirements.txt has dependencies with versions - to generate it, run command pip freeze
Impact of Technical Debt
Slows down deployments
Increases probability and frequency of bugs
Adds unnecessary size to the Docker image by adding unnecessary dependencies
Produces highly random / non-deterministic environment
Activity