Browse Source

speed up boot by adding yarn install to build

Fabian Peter Hammerle 5 years ago
parent
commit
dfea481ac3
2 changed files with 6 additions and 9 deletions
  1. 3 1
      Dockerfile
  2. 3 8
      README.md

+ 3 - 1
Dockerfile

@@ -2,7 +2,7 @@ FROM php:7.2-alpine
 
 # postgresql-dev: required for build of pgsql (includes libpq-fe.h)
 # zlib-dev: required by zip module
-# yarn: called by artisan koel:init
+# yarn: called by artisan koel:init to prepare frontend
 RUN apk add \
     composer \
     git \
@@ -27,4 +27,6 @@ RUN sed 's/^APP_KEY=$/APP_KEY=WORKAROUND_000000000000000000000/' .env.example >.
 RUN composer install --no-interaction
 # TODO revert workaround
 
+RUN yarn install
+
 CMD ["sh"]

+ 3 - 8
README.md

@@ -61,18 +61,13 @@ The absolute path to your media directory. If this is skipped (left blank) now,
 Compiling front-end stuff
 yarn install v1.7.0
 [1/4] Resolving packages...
-[2/4] Fetching packages...
-info fsevents@1.1.2: The platform "linux" is incompatible with this module.
-info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
-[3/4] Linking dependencies...
-warning " > @phanan/vuebus@1.0.0" has incorrect peer dependency "vue@^2.5.13".
-[4/4] Building fresh packages...
+success Already up-to-date.
 $ yarn production
 yarn run v1.7.0
 $ cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js
 ...
-Done in 23.32s.
-Done in 77.88s.
+Done in 21.61s.
+Done in 22.87s.
 
 🎆  Success! Koel can now be run from localhost with `php artisan serve`.
 You can also scan for media with `php artisan koel:sync`.