mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-08 16:05:05 -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_SHELL=
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
RUN groupadd --system ${EP_GID:+--gid "${EP_GID}" --non-unique} 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
|
||||
fi
|
||||
|
||||
|
||||
log "Installing dependencies..."
|
||||
(
|
||||
mkdir -p node_modules &&
|
||||
cd node_modules &&
|
||||
{ [ -d ep_etherpad-lite ] || ln -sf ../src ep_etherpad-lite; } &&
|
||||
cd ep_etherpad-lite &&
|
||||
npm ci --no-optional --omit=optional --include=dev --lockfile-version 1
|
||||
) || exit 1
|
||||
(mkdir -p node_modules &&
|
||||
cd node_modules && ls -lisa &&
|
||||
{ [ -d ep_etherpad-lite ] || ln -sf ../src ep_etherpad-lite; } &&
|
||||
cd ep_etherpad-lite)
|
||||
|
||||
if [[ -z NODE_ENV ]]; then
|
||||
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
|
||||
log "Clearing minified cache..."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue