Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hot reloading instructions #1237

Merged
merged 6 commits into from
Jun 8, 2022

Conversation

nichhk
Copy link
Member

@nichhk nichhk commented Jun 4, 2022

Fixes #1218

  • Up to date with dev branch
  • Branch name follows guidelines
  • All PR Status checks are successful
  • Peer reviewed and approved

Any questions? See the getting started guide

@nichhk nichhk linked an issue Jun 4, 2022 that may be closed by this pull request
@nichhk nichhk requested a review from joshuayhwu June 4, 2022 22:31
Copy link
Contributor

@joshuayhwu joshuayhwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortuately gunicorn is not compatible with windows system, so I can't test if this works or not. I looked at the combination with hupper and waitress which essentially does the samething, but I'm fine with docker build solution. Perhaps someone else with a linux system could test this and confirm if this works?

References: Hupper, waitress-serve, gunicorn windows incompatible

@nichhk
Copy link
Member Author

nichhk commented Jun 6, 2022

Ah, thanks for the heads up. I realized we can still use Docker; we just need to provide a custom command that runs gunicorn with "--reload". This should work for both unix and windows devs. PTAL.

Copy link
Contributor

@joshuayhwu joshuayhwu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Nich! This works like a charm! Just in case other people also have windows system and faces error with the dash run line, simply put the quotation over the entire host path to container path, i.e.

docker run -p 5500:5500 -v "$(pwd):/app" -e PRELOAD=False la311data/dash-poc gunicorn --bind 0.0.0.0:5500 --timeout 300 --workers 2 index:server --reload

@nichhk
Copy link
Member Author

nichhk commented Jun 8, 2022

Thanks for testing it out! I updated my changes with your tip. It works on my mac as well.

@nichhk nichhk merged commit cf00fcc into dev Jun 8, 2022
@nichhk nichhk deleted the 1218-hot-reloading-not-working-with-docker+dash branch June 8, 2022 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hot-reloading not working with Docker+Dash
2 participants