How to deploy a nodejs REST API backend dependent on redis on Azure?
I'm attempting to deploy my Node.js REST API backend on Azure, which relies on Redis for caching (or session management). My current setup uses Docker Compose, and I have already uploaded the images for both my Node.js backend and Redis to my Azure Container Registry (ACR). In my Docker Compose file, I'm referencing these images directly from ACR.
However, after deployment, I’m encountering two main issues:
Redis Connectivity Issue: The Node.js backend is failing to connect to the Redis server. The logs suggest that when my backend container starts, it cannot resolve or reach the Redis container. I suspect this may be an issue with network configuration within the Docker Compose deployment or possibly related to how Azure handles inter-container communication. I’ve double-checked that the Redis container is running and that the image is correctly defined in ACR. The connection string (or environment variable) pointing to Redis uses either the service or container name as defined in the Compose file.
Application Error on Accessing Backend URL: When I try to access the public URL of my deployed backend, I receive a generic "Application Error". This indicates that the backend isn’t starting correctly, likely due to its inability to connect to Redis.