novuhq / novu

Open-Source Notification Platform. Embeddable Notification Center, E-mail, Push and Slack Integrations.
https://novu.co
Other
34.01k stars 3.47k forks source link

Docs: Setting Novu up behind nginx reverse proxy #2126

Open tvarsis opened 1 year ago

tvarsis commented 1 year ago

🔖 Feature description

I have searched the documentation, but can't find any tutorials about how to set Novu up behind nginx reverse proxy. I found a couple of env variables that should be used for this, but they are not documented how to use anywhere outside the env file. I would guess nginx needs web sockets for some services etc as well, so a more detailed guide for this would be awesome.

🎤 Why is this feature needed ?

I think deploying Novu behind a reverse proxy, will be a very common use case.

✌️ How do you aim to achieve this?

If I knew how to do it, I would be happy to provide documentation, but I don't. I tested a lot of things, but could not get passed just loading the web gui.

🔄️ Additional Information

No response

👀 Have you spent some time to check if this feature request has been raised before?

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

No response

vishnu-kyatannawar commented 1 year ago

Even I tried today to setup novu behind nginx reverse proxy but no luck.

I am changing the API so that the frontend will call the correct API url but it seem to still use the localhost:3000 url as the API_ROOT_URL.

vipulsharma144 commented 1 year ago

Hey @vishnu-kyatannawar, After some struggle, I was able to set it up behind Nginx. If you are using docker-composer you can use this image ghcr.io/joeyeamigh/novu/web:nv-1803 or wait for the image update(idk if it's updated). Since the fix has been merged to the next branch you can also build it if you are not using containerized version. Here is the PR.

vishnu-kyatannawar commented 1 year ago

Thanks @vipulsharma144 I think this will resolve my issue.

jainpawan21 commented 1 year ago

Check this detailed answer in discord by our community member https://discord.com/channels/895029566685462578/1034761483717967893/1088081696756355243

torrswanson commented 1 year ago

I am still seeing this issue in tag 0.14.0 with the front end calling localhost:3000/v1/auth/login and localhost:3000/v1/auth/register calls on a fresh install when trying to sign in or register. My .env API_ROOT_URL is set correctly to novu-api.XXXX.com and the changes are reflected within the docker's environment for the app web.

Discord link is down so I can't reference the discussion there.

Am I missing something obvious?

aayushave commented 9 months ago

hi community, any luck in addressing this issue? i am facing same issue with novu in kubernetes ingress nginx ]