Skip to content

Commit

Permalink
#270 - configurable refresh time
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilpiech97 committed Mar 25, 2024
1 parent e5de226 commit 382d8b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,6 @@ SANCTUM_STATEFUL_DOMAINS=toby.blumilk.localhost

SOPS_AGE_BETA_SECRET_KEY=
SOPS_AGE_PROD_SECRET_KEY=

# 5 minutes (in miliseconds)
VITE_LAST_UPDATE_TIMEOUT=300000
1 change: 1 addition & 0 deletions environment/prod/app/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ FROM node:21.6.2-bullseye-slim as frontend
WORKDIR /app_frontend_dependencies

COPY package.json package-lock.json postcss.config.js tailwind.config.js vite.config.js ./
COPY ./environment/prod/app/vite.env .env

RUN npm clean-install

Expand Down
1 change: 1 addition & 0 deletions environment/prod/app/vite.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_LAST_UPDATE_TIMEOUT=300000
2 changes: 1 addition & 1 deletion resources/js/Shared/LastUpdate.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ const fetchLastUpdate = async () => {
onMounted(() => {
fetchLastUpdate()
setInterval(fetchLastUpdate, 300000) // 5 minutes
setInterval(fetchLastUpdate, import.meta.env.VITE_LAST_UPDATE_TIMEOUT)
})
</script>

0 comments on commit 382d8b3

Please sign in to comment.