Running in docker compose seems to break livereload
EmmanuelMess opened this issue · 5 comments
EmmanuelMess commented
Is there a way to run server in dockercompose and have livereload work?
kbuilds commented
Yes, it is possible. What issue are you having?
EmmanuelMess commented
I am having trouble executing livereload on the same container, the recommended way doesn't see to work. I have a single service in my docker compose that runs a script:
#!/bin/sh
# Start the first process
python /app/manage.py livereload &
# Start the second process
python /app/manage.py runserver localhost:8000 &
# Wait for any process to exit
wait -n
# Exit with status of process that exited first
exit $?
EmmanuelMess commented
Okay, this seems to load a page, but doesn't reload:
#!/bin/sh
# Start the first process
python /app/manage.py livereload &
# Start the second process
python /app/manage.py runserver 0.0.0.0:8000 &
# Wait for any process to exit
wait -n
# Exit with status of process that exited first
exit $?
Danjoe4 commented
For anyone having this issue, make sure you run inside docker containers with
python manage.py livereload --host=0.0.0.0
kbuilds commented
@EmmanuelMess @Danjoe4 Can we close this if the issue has been resolved? I think that this is a configuration issue for running inside of Docker, and not an issue with this project.