mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2025-10-28 23:05:01 -04:00
add DISABLE_EXTRACT to dockerfile and max-parallel to fix docker workflows
Signed-off-by: Simon Smith <simonsmith5521@gmail.com>
This commit is contained in:
parent
4137132701
commit
d7efb1f3b1
4
.github/workflows/docker.yml
vendored
4
.github/workflows/docker.yml
vendored
@ -42,6 +42,7 @@ jobs:
|
||||
needs: translate
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
variant: [mongodb, postgresql, mariadb, all, slim]
|
||||
name: Build Docker Image (amd64-${{ matrix.variant }})
|
||||
@ -99,6 +100,7 @@ jobs:
|
||||
needs: translate
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
variant: [mongodb, postgresql, mariadb, all, slim]
|
||||
name: Build Docker Image (arm64-${{ matrix.variant }})
|
||||
@ -157,6 +159,7 @@ jobs:
|
||||
needs: translate
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
variant: [mongodb, postgresql, mariadb, all, slim]
|
||||
name: Build Docker Image (armv7-${{ matrix.variant }})
|
||||
@ -215,6 +218,7 @@ jobs:
|
||||
needs: translate
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 3
|
||||
matrix:
|
||||
variant: [mongodb, postgresql, mariadb, all, slim]
|
||||
name: Build Docker Image (armv6-${{ matrix.variant }})
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
FROM node:lts-alpine3.22 AS builder
|
||||
|
||||
# Any value inside one of the disable ARGs will be accepted.
|
||||
ARG DISABLE_EXTRACT="yes"
|
||||
ARG DISABLE_MINIFY="yes"
|
||||
ARG DISABLE_TRANSLATE="yes"
|
||||
# NODE_OPTIONS="--max_old_space_size=4096"
|
||||
@ -12,14 +13,18 @@ WORKDIR /opt/meshcentral
|
||||
COPY ./ /opt/meshcentral/meshcentral/
|
||||
|
||||
# Check the Docker build arguments and if they are empty do the task.
|
||||
RUN apk add --no-cache python3 make g++ bash
|
||||
RUN if [ -n "$DISABLE_MINIFY" ] || [ -n "$DISABLE_TRANSLATE" ]; then \
|
||||
RUN if [ -n "$DISABLE_EXTRACT" ] || [ -n "$DISABLE_MINIFY" ] || [ -n "$DISABLE_TRANSLATE" ]; then \
|
||||
echo -e "----------\nPREPARING ENVIRONMENT...\n----------"; \
|
||||
cd meshcentral && \
|
||||
npm install html-minifier-terser@7.2.0 jsdom@26.0.0 esprima@4.0.1 && \
|
||||
cd translate && \
|
||||
echo -e "----------\nSTARTING THE EXTRACTING PROCESS...\n----------"; \
|
||||
node translate.js extractall && \
|
||||
case "$DISABLE_EXTRACT" in \
|
||||
false|no|FALSE|NO) \
|
||||
echo -e "----------\nSTARTING THE EXTRACTING PROCESS...\n----------"; \
|
||||
node translate.js extractall;; \
|
||||
*) \
|
||||
echo "Setting EXTRACT as disabled.";; \
|
||||
esac && \
|
||||
case "$DISABLE_MINIFY" in \
|
||||
false|no|FALSE|NO) \
|
||||
echo -e "----------\nSTARTING THE MINIFYING PROCESS...\n----------"; \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user