replace watchman with django-watchfiles
same change implemented in GB here: https://github.com/intelowlproject/GreedyBear/pull/890
hey @mlodic can i work on this one?
please share the plan
Sure, here is my implementation plan :
Phase 1: Dockerfile Restructuring
- restructure Dockerfile to have 3 build stages: frontend, production, and develop
- move health checks from Dockerfiles to compose files
Phase 2: Dependency Changes
- replace Watchman with django-watchfiles
- switch from uWSGI to pyuWSGI to eliminate build-time compiler dependencies
- remove watchman installation script
Phase 3: Entrypoint Modernization
- entrypoint scripts now use exec "$@" pattern
- move actual start commands from entrypoints to compose files
Phase 4: Settings Updates
- conditionally add django_watchfiles to Django INSTALLED_APPS
- remove watchman-related configurations
- update uwsgi config for pyuwsgi compatibility
Phase 5: Build Optimization
- enhance .dockerignore for faster builds
Phase 6: Script Updates
- update management script for new configuration
@SAMurai-16 you just copy/pasted the comment from the other repo, we don't accept contributors that don't take this seriously
@mlodic sorry for the confusion, I thought as you said same change implemented in GB in the issue, you would want it to be implemented in a similar way
hmm sounds interesting but a phenomenal shift,. I had a look at the greedybear PR and how docker setup is structured right now and how it caused me issue in my previous prs :),
i am getting the intuition that core of this is straightforward but the effects need careful handling.
the watchman_install script is doing a lot of heavy lifting right now, downloading the binary, setting permissions, the whole deal, and it is like very linked with the WATCHMAN build arg in the Dockerfile and the pywatchman dependency.
what i am thinking is to rip all of that out, add django-watchfiles to the dev requirements instead, and conditionally append django_watchfiles to INSTALLED_APPS in settings/init.
@mlodic, the dockerfile should be minused with the watchman_install.sh call in the build step, and we can drop the gcc/build-dep.
the entrypoint uwsgi stays mostly as it is since the runserver path still works, django-watchfiles just hooks in automatically when it is in INSTALLED_APPS and the dev server starts. the django-server-requirements.txt file itself will become trash since its only content is pywatchman.
my current assignment on the phishing extractor work has been reviewed once already, changes are done and pushed on that front. If you allow,, can i get this one assigned as this migration sounds tooo interesting to me... :)