build(docker): use yarn for theme assets
This commit is contained in:
parent
21e36c47b9
commit
90d593fef8
|
@ -1,7 +1,12 @@
|
||||||
FROM node:14-alpine AS assets-build
|
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
|
WORKDIR /app/web/themes/custom/opdavies
|
||||||
COPY web/themes/custom/opdavies/package*.json ./
|
COPY web/themes/custom/opdavies/package.json .
|
||||||
RUN npm ci
|
COPY web/themes/custom/opdavies/yarn.lock .
|
||||||
|
RUN yarn install && yarn cache clear
|
||||||
COPY web/themes/custom/opdavies ./
|
COPY web/themes/custom/opdavies ./
|
||||||
RUN npm run production
|
RUN npm run production
|
||||||
|
|
||||||
|
|
|
@ -59,8 +59,8 @@ services:
|
||||||
- node_modules:/node/node_modules
|
- node_modules:/node/node_modules
|
||||||
- ./config:/node/config
|
- ./config:/node/config
|
||||||
- ./web/themes/custom/opdavies/assets:/node/assets
|
- ./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/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/postcss.config.js:/node/postcss.config.js
|
||||||
- ./web/themes/custom/opdavies/tailwindcss:/node/tailwindcss
|
- ./web/themes/custom/opdavies/tailwindcss:/node/tailwindcss
|
||||||
- ./web/themes/custom/opdavies/tailwind.config.js:/node/tailwind.config.js
|
- ./web/themes/custom/opdavies/tailwind.config.js:/node/tailwind.config.js
|
||||||
|
|
1
web/themes/custom/opdavies/.yarnrc
Normal file
1
web/themes/custom/opdavies/.yarnrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
--modules-folder /node_modules
|
9914
web/themes/custom/opdavies/package-lock.json
generated
9914
web/themes/custom/opdavies/package-lock.json
generated
File diff suppressed because it is too large
Load diff
5243
web/themes/custom/opdavies/yarn.lock
Normal file
5243
web/themes/custom/opdavies/yarn.lock
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue