diff --git a/.dockerignore b/.dockerignore index 9af5bc9..36a5e88 100644 --- a/.dockerignore +++ b/.dockerignore @@ -15,6 +15,7 @@ UPDATE.md blogs tools __pycache__ +.cache *.log .DS_Store Thumbs.db diff --git a/.gitignore b/.gitignore index 0e1e905..b23ffe6 100644 --- a/.gitignore +++ b/.gitignore @@ -24,6 +24,7 @@ vite.config.ts.timestamp-* bun.lock __pycache__/ +.cache/ Update.md PROJECT.md blogs/ diff --git a/Dockerfile b/Dockerfile index cf348dc..239c536 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,7 @@ COPY package.json ./ RUN bun install --production --ignore-scripts COPY --from=build /app/build ./build +RUN mkdir -p /app/.cache/music && chown -R bun:bun /app/.cache ENV NODE_ENV=production ENV PORT=3000 diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 3498a90..71f6173 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -1,6 +1,8 @@ import type { ServerInit } from '@sveltejs/kit'; import { getDiscordClient } from '#lib/server/discord'; +import { refreshMusicCache } from '#lib/server/musicCache'; export const init: ServerInit = () => { getDiscordClient(); + refreshMusicCache(); }; diff --git a/src/lib/components/shell/Music.svelte b/src/lib/components/shell/Music.svelte index 406ba06..40678ff 100644 --- a/src/lib/components/shell/Music.svelte +++ b/src/lib/components/shell/Music.svelte @@ -18,6 +18,7 @@ {#if track} {#key musicPlayer.streamKey}