diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 4755151..837a74d 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -48,8 +48,8 @@ jobs: NO_PROXY: 127.0.0.1,localhost,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 no_proxy: 127.0.0.1,localhost,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 NS: tafsirquran - PUBLIC_WEB: http://185.252.31.44:30820 - PUBLIC_API: http://185.252.31.44:30821 + PUBLIC_WEB: https://quranb.afrino.co + PUBLIC_API: https://quranb.afrino.co run: | set -euo pipefail ./scripts/cicd-deploy.sh diff --git a/Dockerfile.web b/Dockerfile.web index 9cbd8f8..11c1093 100644 --- a/Dockerfile.web +++ b/Dockerfile.web @@ -5,7 +5,7 @@ ARG http_proxy ARG https_proxy ARG NO_PROXY ARG no_proxy -ARG API_BASE=http://185.252.31.44:30821/ +ARG API_BASE=https://quranb.afrino.co/ WORKDIR /src COPY NuGet.Config ./ COPY src/TafsirQuran.Shared/TafsirQuran.Shared.csproj src/TafsirQuran.Shared/ diff --git a/k8s/manifest.yaml b/k8s/manifest.yaml index 26076d9..cb1c23c 100644 --- a/k8s/manifest.yaml +++ b/k8s/manifest.yaml @@ -32,7 +32,7 @@ metadata: name: tafsirquran-web-env namespace: tafsirquran data: - ApiBaseAddress: "http://185.252.31.44:30821/" + ApiBaseAddress: "https://quranb.afrino.co/" --- apiVersion: v1 kind: PersistentVolumeClaim diff --git a/scripts/cicd-deploy.sh b/scripts/cicd-deploy.sh index 4f5fb0e..b1f8f68 100755 --- a/scripts/cicd-deploy.sh +++ b/scripts/cicd-deploy.sh @@ -8,8 +8,8 @@ NS="${NS:-tafsirquran}" API_IMAGE="${API_IMAGE:-tafsirquran-api:latest}" WEB_IMAGE="${WEB_IMAGE:-tafsirquran-web:latest}" MANIFEST="${MANIFEST:-$ROOT/k8s/manifest.yaml}" -PUBLIC_WEB="${PUBLIC_WEB:-http://185.252.31.44:30820}" -PUBLIC_API="${PUBLIC_API:-http://185.252.31.44:30821}" +PUBLIC_WEB="${PUBLIC_WEB:-https://quranb.afrino.co}" +PUBLIC_API="${PUBLIC_API:-https://quranb.afrino.co}" PROXY="${HTTPS_PROXY:-${HTTP_PROXY:-${https_proxy:-${http_proxy:-}}}}" NO_PROXY_VAL="${NO_PROXY:-${no_proxy:-127.0.0.1,localhost,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16}}" diff --git a/src/TafsirQuran.Web/wwwroot/appsettings.json b/src/TafsirQuran.Web/wwwroot/appsettings.json index 7f1699c..bdf0e6e 100644 --- a/src/TafsirQuran.Web/wwwroot/appsettings.json +++ b/src/TafsirQuran.Web/wwwroot/appsettings.json @@ -1,3 +1,3 @@ { - "ApiBaseAddress": "http://185.252.31.44:30821/" + "ApiBaseAddress": "https://quranb.afrino.co/" } diff --git a/src/TafsirQuran.Web/wwwroot/service-worker.published.js b/src/TafsirQuran.Web/wwwroot/service-worker.published.js index d987473..cc008ff 100644 --- a/src/TafsirQuran.Web/wwwroot/service-worker.published.js +++ b/src/TafsirQuran.Web/wwwroot/service-worker.published.js @@ -1,5 +1,5 @@ // Cache static WASM assets only — never HTML navigations. -const CACHE = 'tafsirquran-wasm-v1'; +const CACHE = 'tafsirquran-wasm-v2'; self.addEventListener('install', event => event.waitUntil(self.skipWaiting())); self.addEventListener('activate', event => event.waitUntil( @@ -15,7 +15,7 @@ self.addEventListener('fetch', event => { event.respondWith(fetch(req)); return; } - if (url.pathname.startsWith('/api/') || url.origin.includes(':30821')) { + if (url.pathname.startsWith('/api/')) { event.respondWith(fetch(req)); return; }