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

Not changing code before run unit tests #26

Open
gilsondev opened this issue May 12, 2016 · 7 comments
Open

Not changing code before run unit tests #26

gilsondev opened this issue May 12, 2016 · 7 comments

Comments

@gilsondev
Copy link

When I create and run the container, I run the tests to check the result. But when I make a change, it is not reflected and shows the same result. How can he see this change in code?

@mjhea0
Copy link
Contributor

mjhea0 commented May 12, 2016

Can you post the Github link to your code?

Sent from my iPhone

On May 12, 2016, at 7:32 AM, Gilson Filho [email protected] wrote:

When I create and run the container, I run the tests to check the result. But when I make a change, it is not reflected and shows the same result. How can he see this change in code?


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub

@FingerLiu
Copy link

Gunicorn does not do auto reload changes in your code by default. You can add param --reload to gunicron, but it is not recommend to do this in prd env, cause it may lead to memory lead.

In my opinion the right way is to stop & rm the container, thne docker-compose build, then docker-compose start

@mjhea0
Copy link
Contributor

mjhea0 commented May 16, 2016

@FingerLiu in development this can be pretty burdensome. Any suggestions?

@dukebody
Copy link

I'd say use a volume for local development and runserver instead of gunicorn, so code is reloaded whenever you make a change.

@mjhea0
Copy link
Contributor

mjhea0 commented May 17, 2016

Agreed @dukebody. That's how I set up the compose file.

@FingerLiu
Copy link

Maybe in development, runserver is enough, but if a man insist to use gunicorn , he can just simply add --reload to https://github.com/realpython/dockerizing-django/blob/master/docker-compose.yml#L15

as command: /usr/local/bin/gunicorn docker_django.wsgi:application -w 2 -b :8000 --reload

@slyapustin
Copy link

@gilsondev Did you see updated code inside Docker container?
Which version of Docker you use and on which host OS?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants