Hello everyone, glad to see this beautiful subreddit!
My goal is to set up a frontend & backend inside a Docker Compose and make this app accessible through ngrok. I’ve been stuck pretty hard with organizing my docker-compose, so I believe my setup has some misconceptions. Here is my current setup:
which leads to ERR_NAME_NOT_RESOLVED. Using localhost:3001 works fine locally, but through ngrok, this setup is not working.
To expose it throught nginx I’m simply using ngrok http 80
The frontend is a Remix-Express app, and the backend is a simple Express Node.js app (no extra magic in Dockerfiles).
Frontend like client side javascript? The internal DNS server will not resolve that for your web browser. Please, read my post here as well, if I was right:
Also
It does not seem to be right either. You can either define a list of env variables using the equals sign or a mapping of key value pairs. What you defined is a string, but I’m surprised it allowed to start the project. Maybe compose supports a string syntax as well? Never tried and never read it in documentation. So valid ways:
My goal is to wrap whole application into docker-compose and expose it through ngrok.
Client means web-app like React | Angular (whatever). I want to share locally hosted app through ngrok
Could you share please strategies | examples I could use to achieve this behavior. My docker knowledge unfortunately quite low, any help will be appreciated
As I often say, Docker is not a magic wand. client-server relationships still exist. Your webbrowser will have to communicate with the backend over network. There is no different stategy for that in docker containers. Docker just runs your server applications in an isolated way. The answer I shared from the other topic is all I can say about the problem. Please, point out which part you don’t understand if you feel you still need more help.
Of course, I understand that there is no magic behind docker
My goal is to find strategy which will allow me to expose my app through ngrok with isolation from other env