depoly novu using docker compose and nginx
I'm trying to deploy novu (production) using docker compose and nginx, I got:
https://notify.example.com/auth/signup' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://novu-api:3000/v1/auth/register'. This request has been blocked; the content must be served over HTTPS.check out the attached config files
3 Replies
Hi @smart35757, I'm an AI assistant for Novu. While a team member reviews this question, I'll see if I can find relevant sources for your question.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* AWS
* Deploy with Docker
* Dev Studio
* Run Novu in local machine
-----------------------------
Answer
It appears you're encountering a mixed content issue where secure HTTPS pages are trying to load resources over an insecure HTTP connection. This commonly happens if your application is set up to use HTTPS, but internal requests are being made over HTTP.
To resolve this issue for deploying Novu using Docker Compose and Nginx, you need to ensure that all internal service communications are also over HTTPS or that the Nginx configuration is correctly rewriting HTTP requests to HTTPS.
Here's a general approach on how to configure Nginx to handle HTTPS requests and redirect HTTP traffic to HTTPS, which might help resolve your issue:
1. Ensure Certificates are Configured: Make sure that you have SSL certificates correctly configured for your domain in Nginx.
2. Update Nginx Configuration: Modify your Nginx configuration to redirect all HTTP traffic to HTTPS and to proxy pass HTTPS requests correctly to your Docker services.
Here is an example of how you might configure your Nginx to handle HTTPS:
3. Configure Docker Compose Services: Ensure that your Docker Compose services are set up to communicate over HTTPS if they are exposed to the internet. This might involve configuring your services to use SSL within their configurations.
4. Environment Variables: Check if environment variables in your Docker Compose setup for Novu need to be adjusted to use HTTPS URLs.
This setup ensures that all requests are redirected to HTTPS, which should help avoid mixed content issues. Make sure to replace
/path/to/your/fullchain.pem
and /path/to/your/privkey.pem
with the actual paths to your SSL certificate files.
If you're still encountering issues or need to adjust the setup based on specific requirements of Novu or your infrastructure, consider reviewing the official documentation for any additional settings or configurations required for HTTPS deployments (1) .
Remember, the actual implementation details might vary based on your exact setup and requirements, so adjust the configurations accordingly. If you need more specific guidance, please provide more details about your setup or check the official Novu documentation related to deploying with Docker and using Nginx as a reverse proxy.
: Deploy with DockerGot it. Tagging @Support for additional help.