diff --git a/frontend/config/paths.js b/frontend/config/paths.js index 5164270015..bde0897ddf 100644 --- a/frontend/config/paths.js +++ b/frontend/config/paths.js @@ -22,8 +22,10 @@ const resolveApp = relativePath => path.resolve(appDirectory, relativePath); // ); // reset by custom -const HOST = '127.0.0.1'; -const PORT = process.env.PORT || '3000'; +const CONFIG_HOST = process.env.HOST; +const isRunInDocker = CONFIG_HOST === '0.0.0.0'; +const HOST = isRunInDocker ? '127.0.0.1' : CONFIG_HOST; +const PORT = process.env.PORT || '3001'; const publicPath = process.env.PUBLIC_PATH || '/assets/bundles/'; const publicUrlOrPath = `http://${HOST}:${PORT}${publicPath}`;