kopia lustrzana https://github.com/wagtail/docker-wagtail-develop
Improved the speed of the frontend build. (#38)
rodzic
a0d0721734
commit
a0e731f937
|
@ -1,6 +1,7 @@
|
|||
FROM node:14-slim
|
||||
LABEL maintainer="hello@wagtail.io"
|
||||
|
||||
RUN apt-get update && apt-get install rsync -y
|
||||
COPY ./wagtail/package.json ./wagtail/package-lock.json ./
|
||||
|
||||
RUN npm --prefix / install
|
||||
RUN npm --prefix / install --loglevel info
|
||||
|
|
|
@ -2,7 +2,8 @@ version: '3'
|
|||
|
||||
volumes:
|
||||
postgres-data:
|
||||
|
||||
node_modules:
|
||||
|
||||
services:
|
||||
web:
|
||||
container_name: "web"
|
||||
|
@ -13,6 +14,7 @@ services:
|
|||
volumes:
|
||||
- ./wagtail:/code/wagtail:delegated,rw
|
||||
- ./bakerydemo:/code/bakerydemo:delegated,rw
|
||||
- node_modules:/code/wagtail/node_modules/
|
||||
ports:
|
||||
- "8000:8000"
|
||||
environment:
|
||||
|
@ -41,10 +43,7 @@ services:
|
|||
working_dir: /code/wagtail
|
||||
volumes:
|
||||
- ./wagtail:/code/wagtail:delegated,rw
|
||||
command:
|
||||
- /bin/sh
|
||||
- -c
|
||||
- |
|
||||
cp -ru /node_modules /code/wagtail
|
||||
npm run start
|
||||
- node_modules:/code/wagtail/node_modules/
|
||||
command: bash -c "echo 'Copying node_modules, this may take a few minutes...' && rsync -rah --info=progress2 /node_modules /code/wagtail/ && npm run start"
|
||||
restart: "no"
|
||||
tty: true
|
Ładowanie…
Reference in New Issue