Reply to comment


April 27, 2021, 10:45 a.m. -  Felix

Dear Mausam, Many thanks for this great article, everything works like a charm. Now, I would like to deploy my app on a DigitalOcean droplet (https://www.digitalocean.com), so basically on a remote ubuntu machine. The problem I encounter is the following: When I navigate to my website in the browser, it finds my index.html but does not resolve for the actual react app. (It just shows a white/blank website with some text I inserted test-wise in the index.html but not the actual react contents and also the tab of the browser reflects my correct index.html). I further noticed that when I start my containers with "docker-compose up --build", in the react section it says: react_1 | INFO: Accepting connections at http://localhost:3000 Here I was wondering whether it shouldn't say "localhost" but rather the IP address of the remote ubuntu machine? What I did for the deployment is: Added this to the main .env file: ENV_API_SERVER=http://207.154.224.222 (the current IP of the droplet) HOST=0.0.0.0 (I read that this should resolve the issue but it didn't help) Added this to the Django .env file: DJANGO_ALLOWED_HOSTS=207.154.224.222 [::1] It would be highly appreciated if you could give me hint what changes I have to introduce to deploy it on such a server. Many thanks!

Post your comment

Required for comment verification