mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-09-02 02:12:37 +02:00
Dockerfile and webpack config updates
This commit is contained in:
10
Dockerfile
10
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 <Chris@ChrisKankiewicz.com>"
|
||||
|
||||
COPY --from=js-dependencies /app /var/www/html
|
||||
COPY --from=js-dependencies /application /var/www/html
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
|
@@ -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();
|
||||
// }
|
||||
|
Reference in New Issue
Block a user