Improved the speed of the frontend build. (#38)

pull/39/head
Sævar Öfjörð Magnússon 2022-01-18 13:19:52 +00:00 zatwierdzone przez GitHub
rodzic a0d0721734
commit a0e731f937
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 8 dodań i 8 usunięć

Wyświetl plik

@ -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

Wyświetl plik

@ -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