-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Dev environment: Add settings necessary for https and reverse proxy #10265
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
Conversation
(deleted a comment about using |
269c9b1
to
2eec87e
Compare
…e through environment
2eec87e
to
caff0fb
Compare
What's the best way to run this PR locally and check that everything works as expected? What's the |
* ``--ngrok`` is useful when it's required to access the local instance from outside (e.g. GitHub webhook) | ||
* ``--no-django-debug`` runs all containers with ``DEBUG=False`` | ||
* ``--http-domain`` configures an external domain for the environment (useful for Ngrok or other https proxy) | ||
* ``--https`` if using an HTTPS proxy, you may need to force the ``https://`` protocol for settings that otherwise automatically detect it as ``http://`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@humitos I forgot to add in the PR description that this depends on readthedocs/common#176
But yes, it would be nice if you can check that it works with your previous usage of --ngrok
-- no reason that it shouldn't!
So a full demo would be: inv docker.up --no-django-debug --http-domain=<your-ngrok-domain> --https
Note that --https
adds some new stuff that might have worked fine with your ngrok
proxy - I have been running with an extra Nginx proxy in front that might have interfered more.
Is this required for any particular reason? This is the chunk of code that makes me more noise from this PR (touches production code and adds complexity) and I'd try to avoid it unless it's strictly needed for a particular task. I've never required to run our development instance over HTTPS, even when working with GitHub webhooks and other stuffs. I'd be happy if we split this PR in two and remove from this one the |
Note to self: We have areas in the code-base using |
Why
Depends on: readthedocs/common#176
This setup enables a developer to:
DEBUG=False
via an option forinvoke docker.up
🎉What
Changes to docker-compose setup:
inv
tosettings.docker_compose
settings.docker_compose
to enable httpsChanges
This PR was originally intended to add https compatibility to the storage container, but turned out a few more things beyond the
inv docker.up --ngrok=custom.dev.example
have been necessary