From 651f2974c4e27e2269d4f507dc25c93db8ae2f20 Mon Sep 17 00:00:00 2001 From: Kim Date: Mon, 18 Sep 2023 15:43:07 +0200 Subject: [PATCH] added deploy scripts for backend and frontend (use in the folder and while in the vpn) --- csharp/App/Backend/deploy.sh | 1 + typescript/frontend-marios2/deploy.sh | 1 + typescript/frontend-marios2/src/Resources/axiosConfig.tsx | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 csharp/App/Backend/deploy.sh create mode 100755 typescript/frontend-marios2/deploy.sh diff --git a/csharp/App/Backend/deploy.sh b/csharp/App/Backend/deploy.sh new file mode 100755 index 000000000..8d32235e7 --- /dev/null +++ b/csharp/App/Backend/deploy.sh @@ -0,0 +1 @@ +dotnet publish Backend.csproj -c Release -r linux-x64 --self-contained true -p:PublishTrimmed=false && rsync -av bin/Release/net6.0/linux-x64/publish/ ubuntu@194.182.190.208:~/backend && ssh ubuntu@194.182.190.208 'sudo systemctl restart backend' diff --git a/typescript/frontend-marios2/deploy.sh b/typescript/frontend-marios2/deploy.sh new file mode 100755 index 000000000..00a440a01 --- /dev/null +++ b/typescript/frontend-marios2/deploy.sh @@ -0,0 +1 @@ +npm run build && rsync -rv .* ubuntu@194.182.190.208:~/frontend/ && ssh ubuntu@194.182.190.208 'sudo cp -rf ~/frontend/build/* /var/www/html/monitor.innov.energy/html/' && ssh ubuntu@194.182.190.208 'sudo npm install -g serve' diff --git a/typescript/frontend-marios2/src/Resources/axiosConfig.tsx b/typescript/frontend-marios2/src/Resources/axiosConfig.tsx index 7406652c7..84da2b64f 100644 --- a/typescript/frontend-marios2/src/Resources/axiosConfig.tsx +++ b/typescript/frontend-marios2/src/Resources/axiosConfig.tsx @@ -1,11 +1,11 @@ import axios from 'axios'; export const axiosConfigWithoutToken = axios.create({ - baseURL: 'https://localhost:7087/api' + baseURL: 'https://monitor.innov.energy/api' }); const axiosConfig = axios.create({ - baseURL: 'https://localhost:7087/api' + baseURL: 'https://monitor.innov.energy/api' }); axiosConfig.defaults.params = {};