From 5756770b64f23a5d98b573f321caa0c0a02a61d6 Mon Sep 17 00:00:00 2001 From: Bhasher Date: Fri, 12 Jan 2024 13:38:04 +0100 Subject: [PATCH] Update run.sh for merged dockerfile --- frontend/src-tauri/tauri.conf.json | 2 +- run.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/frontend/src-tauri/tauri.conf.json b/frontend/src-tauri/tauri.conf.json index 35ac165..748da85 100644 --- a/frontend/src-tauri/tauri.conf.json +++ b/frontend/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "Focus", - "version": "0.3.1" + "version": "0.3.2" }, "tauri": { "allowlist": { diff --git a/run.sh b/run.sh index c4e5dc1..020a244 100644 --- a/run.sh +++ b/run.sh @@ -1,5 +1,12 @@ #!/bin/bash +PUBLIC_BACKEND_URL=${PUBLIC_BACKEND_URL:-http://localhost:3000} +PUBLIC_BACKEND_WSURL=${PUBLIC_BACKEND_WSURL:-${PUBLIC_BACKEND_URL/http:/ws:}} +PUBLIC_BACKEND_WSURL=${PUBLIC_BACKEND_WSURL/https:/wss:} + +find frontend -type f -exec sed -i "s|http://localhost:3000|$PUBLIC_BACKEND_URL|g" {} + +find frontend -type f -exec sed -i "s|ws://localhost:3000|$PUBLIC_BACKEND_WSURL|g" {} + + cd frontend && npm run preview -- --port 4173 --host 0.0.0.0 & cd backend && ./main &