mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-09 00:15:13 -04:00
Install only production ready dependencies.
This commit is contained in:
parent
08c15fa4a1
commit
e6bb346e6f
2 changed files with 14 additions and 7 deletions
|
@ -60,6 +60,7 @@ ARG EP_UID=5001
|
||||||
ARG EP_GID=0
|
ARG EP_GID=0
|
||||||
ARG EP_SHELL=
|
ARG EP_SHELL=
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
|
RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} etherpad && \
|
||||||
useradd --system ${EP_UID:+--uid "${EP_UID}" --non-unique} --gid etherpad \
|
useradd --system ${EP_UID:+--uid "${EP_UID}" --non-unique} --gid etherpad \
|
||||||
|
|
|
@ -36,14 +36,20 @@ if [ ! -f "$settings" ]; then
|
||||||
cp settings.json.template "$settings" || exit 1
|
cp settings.json.template "$settings" || exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
log "Installing dependencies..."
|
log "Installing dependencies..."
|
||||||
(
|
(mkdir -p node_modules &&
|
||||||
mkdir -p node_modules &&
|
cd node_modules && ls -lisa &&
|
||||||
cd node_modules &&
|
{ [ -d ep_etherpad-lite ] || ln -sf ../src ep_etherpad-lite; } &&
|
||||||
{ [ -d ep_etherpad-lite ] || ln -sf ../src ep_etherpad-lite; } &&
|
cd ep_etherpad-lite)
|
||||||
cd ep_etherpad-lite &&
|
|
||||||
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1
|
if [[ -z NODE_ENV ]]; then
|
||||||
) || exit 1
|
cd src
|
||||||
|
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1 || exit 1
|
||||||
|
else
|
||||||
|
cd src
|
||||||
|
npm ci --no-optional --omit=optional --omit=dev --lockfile-version 1 --production || exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Remove all minified data to force node creating it new
|
# Remove all minified data to force node creating it new
|
||||||
log "Clearing minified cache..."
|
log "Clearing minified cache..."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue