Closed vinod77 closed 3 years ago
@alexandrebodin can you assist here
Migrating issue to the strapi/strapi-docker repo
Hi this is the normal behavior in a docker container as it can't access the host. It is just a warning, you can still manually go to the url of the admin and open it if you shared the app port between your container and your host =) Going to close as there isn't much to do about it :)
Describe the bug Not able to open Strapi app on the Browser while running Strapi on Docker
Steps to reproduce the behavior
Observed Behavior:
app_1 | [2020-10-06T18:43:34.097Z] warn ⚠️ The admin panel is unavailable... Impossible to open it in the browser.
Above error log is from here: https://github.com/strapi/strapi/blob/master/packages/strapi/lib/utils/openBrowser.js#L116And this condition, here: https://github.com/strapi/strapi/blob/master/packages/strapi/lib/utils/openBrowser.js#L110 is becomes false since
e.code
is returning ase.code:: ECONNREFUSED
But when i run the App on my local machine, this cond: https://github.com/strapi/strapi/blob/master/packages/strapi/lib/utils/openBrowser.js#L110 is becomes true & it's not executing this line: https://github.com/strapi/strapi/blob/master/packages/strapi/lib/utils/openBrowser.js#L116 Which works as expected.
Note: My Strapi_app is connected to MongoDB
Expected behavior Strapi app opens on the Browser & Strapi Admin panel should be available while running Strapi on Docker
Code snippets
docker-compose.yml
:Dockerfile
:Our
config/database.js
:Modified this file: https://github.com/strapi/strapi/blob/master/packages/strapi/lib/utils/openBrowser.js#L104 to see the error logs:
Error logs:
System
Additional context Add any other context about the problem here.