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

Shouldn't HTTP(S)_EXPOSE use router_http_port and router_https_port? #23

Open
HeineDeelstra opened this issue Jun 30, 2023 · 2 comments

Comments

@HeineDeelstra
Copy link

I'm was trying to run a ddev project using ddev-varnish on another router_http_port/router_https_port than the default via the project's config.yaml and noticed that the varnish container hardcodes the 80/443 ports. After changing HTTPS_EXPOSE and HTTP_EXPOSE in docker-compose.varnish.yaml's environment to:

  - HTTPS_EXPOSE=${DDEV_ROUTER_HTTPS_PORT}:80,8026:8025
  - HTTP_EXPOSE=${DDEV_ROUTER_HTTP_PORT}:80,8025:8025

and restarting, varnish started working for this project.

@rfay
Copy link
Member

rfay commented Jun 30, 2023

It would be reasonable for this to automatically derive the dynamic ports being used by DDEV, but I'm not sure how ambitious we want to be here. Since the HTTP_EXPOSE stuff can change and the router_http_port can change based on DDEV config, it would require something actively to happen with the varnish docker-compose.varnish.yaml here. Not sure how easy that would be to do. Contributions welcome.

@rfay rfay changed the title Shouldn't HTTP(S)_EXPOSE use ddev router ports? Shouldn't HTTP(S)_EXPOSE use router_http_port and router_https_port? Jun 30, 2023
@rfay
Copy link
Member

rfay commented Jun 30, 2023

Updated title to reflect what I think you were saying, let me know if I got it right.

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

2 participants