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

Live reload Option #4

Closed
5un1lk4nn4n opened this issue Jun 9, 2021 · 3 comments
Closed

Live reload Option #4

5un1lk4nn4n opened this issue Jun 9, 2021 · 3 comments

Comments

@5un1lk4nn4n
Copy link

Hi,
I am trying to use live reload for devlepement. I have added below code in Dockerfile as suggested in uvicorn-gunicorn-fastapi-docker. But when i check it still takes start.sh. Any idea? Thank you very much.

RUN pip install -r requirements.txt

# copy project
COPY . /code/

CMD [ "/start-reload.sh" ]  # <-----

# expose port
EXPOSE 5000
@rednafi
Copy link
Owner

rednafi commented Jun 9, 2021

I don't recommend overriding the uvicorn-gunicorn-fastapi-docker image's default start.sh because it not only runs uvicorn with gunicorn but also does other optimization. Instead, for development, try running it without docker or with your own separate docker image.

@5un1lk4nn4n
Copy link
Author

Thank you.. I will do as per your suggestion.

@limsammy
Copy link

See my PR #6 for running locally (includes live reload)

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

No branches or pull requests

3 participants