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