mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-04-22 03:24:24 -04:00
added build arguments to optionally disable minification/translation of files
This commit is contained in:
parent
d7400118eb
commit
5c8f8c611f
@ -11,16 +11,21 @@ RUN apk add --no-cache bash
|
|||||||
|
|
||||||
FROM base AS builder
|
FROM base AS builder
|
||||||
|
|
||||||
|
ARG DISABLE_TRANSLATE=""
|
||||||
|
ARG DISABLE_MINIFY=""
|
||||||
|
|
||||||
RUN mkdir /opt/meshcentral/meshcentral
|
RUN mkdir /opt/meshcentral/meshcentral
|
||||||
COPY ./ /opt/meshcentral/meshcentral/
|
COPY ./ /opt/meshcentral/meshcentral/
|
||||||
|
|
||||||
# minify files - first try throws Error: Cannot find module 'jsdom'
|
# Extract all MeshCentral strings from web pages and generate the languages.json file. - first try throws Error: Cannot find module 'jsdom'
|
||||||
RUN cd meshcentral/translate && node translate.js minifyall; exit 0
|
RUN cd meshcentral/translate && node translate.js extractall; exit 0;
|
||||||
RUN cd meshcentral/translate && node translate.js minifyall
|
RUN cd meshcentral/translate && node translate.js extractall
|
||||||
|
|
||||||
|
# minify files
|
||||||
|
RUN if [ "$DISABLE_MINIFY" != "yes" ] && [ "$DISABLE_MINIFY" != "YES" ]; then cd meshcentral/translate && node translate.js minifyall; fi
|
||||||
|
|
||||||
# translate
|
# translate
|
||||||
RUN cd meshcentral/translate && node translate.js translateall
|
RUN if [ "$DISABLE_TRANSLATE" != "yes" ] && [ "$DISABLE_TRANSLATE" != "YES" ]; then cd meshcentral/translate && node translate.js translateall; fi
|
||||||
RUN cd meshcentral/translate && node translate.js extractall
|
|
||||||
|
|
||||||
|
|
||||||
FROM base
|
FROM base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user