Closed m-bers closed 2 years ago
You can run the proxy on any port of your choosing if you don't want to use 8081: https://github.com/udevbe/greenfield/blob/master/compositor-proxy/src/config.yaml#L5
As for your error, did you specify a matching COMPOSITOR_SESSION_ID environment variable when running the proxy? https://github.com/udevbe/greenfield#greenfield-compositor-proxy
You can run the proxy on any port of your choosing if you don't want to use 8081:
Yes, and it does work if I change the port to something else both in the docker-compose.yaml
and in index.ts
for the demo module, but I am trying to get BOTH the compositor module and the compositor proxy to listen on port 80, but with the module listening on /
and the proxy URI rewritten to /compositorProxy
As for your error, did you specify a matching COMPOSITOR_SESSION_ID environment variable when running the proxy?
Yeah I'm just using the default COMPOSITOR_SESSION_ID: test123
in both the docker-compose.yaml
and index.ts
What url is the reverse proxy using after rewrite? I know reverse proxy works as we have greenfield running on kubernetes behind an nginx ingress, so I suspect the rewrite rules might screw with the url params. The nginx logs should show this.
I got it working, I apparently neglected the rewrite rule rewrite ^/compositorProxy(/.*)$ $1 break;
though I could have sworn I put it in.
Here's what I did to get it working FWIW: https://github.com/m-bers/greenfield/commit/c504bd4b73ad3abfaeba96013e85bf1b99bcd791
I'm trying to put greenfield behind a reverse proxy (don't want to advertise both 8080 and 8081) but running into issues with the compositor-proxy URL in the demo module's index.ts.
Here's my NGINX config:
Then in
compositor-module/demo-compositor/index.ts
:And I get this in the compositor proxy log: