From 5815dbe5eda22126093ca7e660c058b536c81afd Mon Sep 17 00:00:00 2001 From: frikky Date: Mon, 25 May 2020 12:19:52 +0200 Subject: [PATCH] Removed build from docker-compose, and fixed localhost bug --- docker-compose.yml | 4 ++-- frontend/src/AngularWorkflow.js | 1 - frontend/src/App.js | 10 ++++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a2bcf66d..e04cdbbe 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: frontend: - build: ./frontend + #build: ./frontend image: frikky/shuffle:frontend container_name: shuffle-frontend hostname: shuffle-frontend @@ -26,7 +26,7 @@ services: volumes: - /etc/shuffle:/etc/shuffle backend: - build: ./backend + #build: ./backend image: frikky/shuffle:backend container_name: shuffle-backend hostname: ${BACKEND_HOSTNAME} diff --git a/frontend/src/AngularWorkflow.js b/frontend/src/AngularWorkflow.js index 45b8fe7c..bc9d99fe 100644 --- a/frontend/src/AngularWorkflow.js +++ b/frontend/src/AngularWorkflow.js @@ -4582,7 +4582,6 @@ const AngularWorkflow = (props) => { }} /> - e {executionModal} diff --git a/frontend/src/App.js b/frontend/src/App.js index 8dc79c44..ac162e47 100644 --- a/frontend/src/App.js +++ b/frontend/src/App.js @@ -37,11 +37,13 @@ import { createMuiTheme } from '@material-ui/core/styles'; import AlertTemplate from "react-alert-template-basic"; import { positions, Provider } from "react-alert"; -// Testing - localhost -//const globalUrl = "http://192.168.3.6:5001" - // Production - backend proxy forwarding in nginx -const globalUrl = window.location.origin +var globalUrl = window.location.origin +if (window.location.protocol == "http:" && window.location.port === "3000") { + globalUrl = "http://192.168.3.6:5001" +} +console.log(window.location) +console.log(globalUrl) const surfaceColor = "#27292D" const inputColor = "#383B40"