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

Proxy URLs Cause Round Robin Results for appserver_nginx #91

Open
reynoldsalec opened this issue Jan 8, 2024 · 0 comments
Open

Proxy URLs Cause Round Robin Results for appserver_nginx #91

reynoldsalec opened this issue Jan 8, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@reynoldsalec
Copy link
Member

For an example app...

name: myproject
recipe: wordpress
config:
  via: nginx
  webroot: web
  database: mariadb:10.2
  xdebug: true

proxy:
  node:
    - bs.myproject.lndo.site:3000

services:
  node:
    type: node
    ssl: true
    command: cd /app/web/wp-content/themes/twentytwentyfour && node_modules/.bin/gulp watch

If you ssh into the node service and try to curl -L appserver_nginx, you'll see results from ALL apps you're running with an appserver_nginx container. Ex: your first result from curl might be from Site A, the next from Site B, the third back to Site A, and so on randomly.

The problem is not restricted to services of type: node; we've tested giving proxy settings to other services and experienced the same results. Nor is it restricted to resolving appserver_nginx; rather, it seems trying to curl any service that you have multiple instances of running (for example, two different apps served by Apache) will create the round robin-ing.

Based on this, I'm guessing this is probably caused by the way we set labels on the Docker containers to tell Traeffik how to setup the proxy URLs.

Note that we found this through a user trying to implement the guide on setting up BrowserSync. That may indicate that this is a new-ish issue, or it may simply indicate that most people don't experience this conflict because they didn't have two apps running with appserver_nginx containers.

@reynoldsalec reynoldsalec added the bug Something isn't working label Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant