[READ-ONLY] Mirror of https://github.com/FoxxMD/multi-scrobbler. Scrobble plays from multiple sources to multiple clients docs.multi-scrobbler.app
deezer docker jellyfin koito lastfm listenbrainz maloja mopidy mpris music music-assistant plex scrobble self-hosted spotify subsonic tautulli youtube-music
0

Configure Feed

Select the types of activity you want to include in your feed.

feat(docker): Paralellize npm install and build processes

FoxxMD (Jan 16, 2025, 8:48 PM UTC) 0e4845f2 e2775cd9

+12 -7
+7 -4
Dockerfile
··· 49 49 50 50 RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone 51 51 52 + RUN npm install -g concurrently 53 + 52 54 ARG data_dir=/config 53 55 VOLUME $data_dir 54 56 ENV CONFIG_DIR=$data_dir ··· 61 63 62 64 COPY --chown=abc:abc package*.json tsconfig.json ./ 63 65 COPY --chown=abc:abc patches ./patches 66 + COPY --chown=abc:abc docsite/package*.json tsconfig.json ./docsite/ 64 67 65 68 # for debugging, so the build fails faster when timing out (arm64) 66 69 #RUN npm config set fetch-retries 1 && \ ··· 74 77 75 78 # This FAILED for node < 20 when building arm64 but not amd64 (and alpine-based Dockerfile has no issues building arm64) 76 79 # see https://github.com/FoxxMD/multi-scrobbler/issues/126 77 - RUN npm ci \ 78 - --no-audit \ 79 - && chown -R root:root node_modules 80 + RUN npm run install:parallel \ 81 + && chown -R root:root node_modules \ 82 + && chown -R root:root docsite/node_modules 80 83 81 84 COPY --chown=abc:abc . /app 82 85 83 86 # need to set before build so server/client build is optimized and has constants (if needed) 84 87 ENV NODE_ENV=production 85 88 86 - RUN npm run docs:install && npm run schema && npm run build && rm -rf node_modules && rm -rf docsite/node_modules 89 + RUN npm run build:parallel && rm -rf node_modules && rm -rf docsite/node_modules 87 90 88 91 FROM base AS app 89 92
+5 -3
package.json
··· 13 13 "build:frontend": "vite build", 14 14 "build:backend": "tsc -p src/backend", 15 15 "build": "npm run -s build:backend && npm run -s build:frontend && npm run -s docs:build", 16 - "docs:install": "cd docsite && npm ci", 16 + "build:parallel": "concurrently --kill-others-on-fail --names backend,frontend,docs \"npm run -s build:backend\" \"npm run -s build:frontend\" \"npm run docs:build\"", 17 + "docs:install": "cd docsite && npm ci --no-audit", 17 18 "docs:start": "cd docsite && npm start", 18 - "docs:build": "cd docsite && npm run build", 19 - "postinstall": "patch-package" 19 + "docs:build": "npm run schema && cd docsite && npm run build", 20 + "postinstall": "patch-package", 21 + "install:parallel": "concurrently --kill-others-on-fail --names app,docs \"npm ci --no-audit\" \"npm run docs:install\"" 20 22 }, 21 23 "exports": { 22 24 ".": {