From 6331c1be0e529b720ef3b8f9853c1ea8538fb0aa Mon Sep 17 00:00:00 2001 From: Chris Kankiewicz Date: Sun, 12 Jan 2020 20:09:09 -0700 Subject: [PATCH] Dockerfile and webpack config updates --- Dockerfile | 10 +++++----- webpack.mix.js | 14 ++++++-------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe8b78e..223d16e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ # Install PHP dependencies FROM composer:1.9 AS php-dependencies -COPY . /app -RUN composer install --working-dir /app --ignore-platform-reqs \ +COPY . /application +RUN composer install --working-dir /application --ignore-platform-reqs \ --no-cache --no-dev --no-interaction # Install and compile JavaScript assets FROM node:13.2 AS js-dependencies -COPY --from=php-dependencies /app /app -RUN cd /app && npm install && npm run production +COPY --from=php-dependencies /application /application +RUN cd /application && npm install && npm run production # Build application image FROM php:7.4-apache as application LABEL maintainer="Chris Kankiewicz " -COPY --from=js-dependencies /app /var/www/html +COPY --from=js-dependencies /application /var/www/html RUN a2enmod rewrite diff --git a/webpack.mix.js b/webpack.mix.js index 6e6870d..14fc34f 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -2,8 +2,6 @@ let mix = require('laravel-mix'); let tailwindcss = require('tailwindcss'); require('laravel-mix-purgecss'); -mix.setPublicPath(path.resolve('.')); - mix.sass('app/resources/sass/app.scss', 'app/dist/app.css').options({ processCssUrls: false, postCss: [tailwindcss('tailwind.config.js')] @@ -17,12 +15,12 @@ mix.copyDirectory( ); mix.purgeCss({ - extensions: ["html", "js", "php", "scss", "twig", "vue"], - folders: ["app"], - whitelist: ["html", "body", "main", "fab", "fad", "fal", "far", "fas"], + extensions: ['html', 'js', 'php', 'scss', 'twig', 'vue'], + folders: ['app'], + whitelist: ['html', 'body', 'main', 'fab', 'fad', 'fal', 'far', 'fas'], whitelistPatterns: [/^fa\-/] }); -if (mix.inProduction()) { - mix.version(); -} +// if (mix.inProduction()) { +// mix.version(); +// }