diff --git a/Dockerfile-test b/Dockerfile-test index ef9ed24..9049de5 100644 --- a/Dockerfile-test +++ b/Dockerfile-test @@ -20,7 +20,7 @@ COPY *.json . # Install dependencies and build the app RUN yarn install -RUN yarn build +RUN yarn build-test # Step 2. Production image, copy all the files and run nginx diff --git a/nginx.conf b/nginx.conf index 0994926..414440f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -22,8 +22,8 @@ server { } location ^~/api { - proxy_pass http://localhost:30000; - proxy_set_header Host $host; + proxy_pass https://103.124.155.66; + proxy_set_header Host test-payment-be.hkchc.team; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header REMOTE-HOST $remote_addr; diff --git a/src/hooks/useRemoteUserList.ts b/src/hooks/useRemoteUserList.ts index ff3b9dc..40bf452 100644 --- a/src/hooks/useRemoteUserList.ts +++ b/src/hooks/useRemoteUserList.ts @@ -27,7 +27,10 @@ export function useRemoteUserList() { const list = await getRemoteUserNameList(); return list.flat(); } - const {data:usernameList} = useRequest(loadUserList) + const {data:usernameList} = useRequest(loadUserList,{ + cacheKey:'remote-username-list', + staleTime: 300000 + }) // const [userList, setUserList] = useState([]) //const [usernameList, setUserList] = useState([])