Skip to content

Commit 97ee9ba

Browse files
authored
Local development: use nodemon to watch files instead of watchmedo (#9338)
* Local development: use `nodemon` to watch files instead of `watchmedo` We have been dealing with a problem with `watchmedo` that restart the process when it shouldn't be restarted and it doesn't restart it when it should. I got tired debugging `watchmedo` and I was suggested to give it a try to `nodemon` because we are already using it in other projects. I'm not super happy adding a node dependency to the Dockerfile, but I didn't find a better way to do it. I did some tests with the configuration proposed and it seemed to work pretty well. I'm sure we will find some edge cases, but we always can tune it a little more later. Closes #8802 * Local development: remove `watchdo` Python package It's not required anymore since we are using `nodemon` now.
1 parent 51de884 commit 97ee9ba

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

dockerfiles/Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ RUN apt-get -y install \
2929
sqlite \
3030
netcat \
3131
telnet \
32-
lsb-release
32+
lsb-release \
33+
npm
3334

3435
# Gets the MinIO mc client used to add buckets upon initialization
3536
# If this client should have issues running inside this image, it is also
@@ -38,6 +39,8 @@ RUN apt-get -y install \
3839
RUN curl -s -q https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEASE.2022-06-11T21-10-36Z -o /usr/bin/mc && \
3940
chmod +x /usr/bin/mc
4041

42+
RUN npm install -g nodemon
43+
4144
# Uncomment en_US.UTF-8 locale and generate it
4245
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
4346
locale-gen

requirements/docker.txt

-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ django-redis-cache==3.0.1
1111
# For resizing images
1212
pillow==9.1.0
1313

14-
# Local debugging tools
15-
watchdog==2.1.7
16-
# watchdog dependency
17-
argh==0.26.2
18-
1914
# run tests
2015
tox==3.25.0
2116

0 commit comments

Comments
 (0)