build(docker): use yarn for theme assets

This commit is contained in:
Oliver Davies 2021-12-28 01:35:25 +00:00
parent 21e36c47b9
commit 90d593fef8
5 changed files with 5252 additions and 9917 deletions

View file

@ -1,7 +1,12 @@
FROM node:14-alpine AS assets-build
WORKDIR /app
RUN mkdir /node_modules \
chown node:node -R /node_modules /app
USER node
WORKDIR /app/web/themes/custom/opdavies
COPY web/themes/custom/opdavies/package*.json ./
RUN npm ci
COPY web/themes/custom/opdavies/package.json .
COPY web/themes/custom/opdavies/yarn.lock .
RUN yarn install && yarn cache clear
COPY web/themes/custom/opdavies ./
RUN npm run production

View file

@ -59,8 +59,8 @@ services:
- node_modules:/node/node_modules
- ./config:/node/config
- ./web/themes/custom/opdavies/assets:/node/assets
- ./web/themes/custom/opdavies/package-lock.json:/node/package-lock.json
- ./web/themes/custom/opdavies/package.json:/node/package.json
- ./web/themes/custom/opdavies/yarn.lock:/node/yarn.lock
- ./web/themes/custom/opdavies/postcss.config.js:/node/postcss.config.js
- ./web/themes/custom/opdavies/tailwindcss:/node/tailwindcss
- ./web/themes/custom/opdavies/tailwind.config.js:/node/tailwind.config.js

View file

@ -0,0 +1 @@
--modules-folder /node_modules

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff