Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
smortexa authored Jan 11, 2024
1 parent 7a4d566 commit e01dff2
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG PHP_VERSION=8.2
ARG COMPOSER_VERSION=latest

###########################################
# Build frontend assets with PNPM
# Build frontend assets with NPM
###########################################

ARG NODE_VERSION=20-alpine
Expand All @@ -15,16 +15,15 @@ ENV ROOT=/var/www/html

WORKDIR ${ROOT}

RUN npm install -g pnpm
RUN npm config set update-notifier false && npm set progress=false

COPY package.json pnpm-lock.yaml* ./
COPY package*.json ./

RUN if [ -f ${ROOT}/pnpm-lock.yaml ]; \
RUN if [ -f $ROOT/package-lock.json ]; \
then \
pnpm install --frozen-lockfile --no-optional --prefer-offline; \
elif [ -f ${ROOT}/package.json ]; \
then \
pnpm install --no-optional --prefer-offline; \
NODE_ENV=production npm ci --no-optional --loglevel=error --no-audit; \
else \
NODE_ENV=production npm install --no-optional --loglevel=error --no-audit; \
fi

COPY . .
Expand Down

0 comments on commit e01dff2

Please sign in to comment.