mirror of
https://github.com/Kovah/LinkAce.git
synced 2025-01-17 21:28:30 +01:00
Several corrections for the Docker build process
This commit is contained in:
parent
8ce7e901fc
commit
d18933c5be
@ -1,6 +1,15 @@
|
||||
.env
|
||||
_ide_*
|
||||
storage/debugbar/*
|
||||
storage/framework/views/*
|
||||
storage/logs/*
|
||||
node_modules
|
||||
/.git
|
||||
/.idea
|
||||
/.tmp
|
||||
/storage/app/backup-temp
|
||||
/storage/app/backups
|
||||
/storage/debugbar/*
|
||||
/storage/framework/cache/*
|
||||
/storage/framework/sessions/*
|
||||
/storage/framework/testing/*
|
||||
/storage/framework/views/*
|
||||
/storage/logs/*
|
||||
/node_modules
|
||||
/vendor
|
||||
|
@ -16,19 +16,18 @@ RUN composer install -n --prefer-dist --no-dev
|
||||
# ================================
|
||||
# Compile all assets
|
||||
FROM node:10.15.0 AS npm_builder
|
||||
|
||||
# Copy package.json and Gruntfile
|
||||
COPY ./package.json /srv
|
||||
COPY ./Gruntfile.js /srv
|
||||
WORKDIR /srv
|
||||
|
||||
RUN npm install
|
||||
# Copy package.json and Gruntfile
|
||||
COPY ./package.json ./
|
||||
COPY ./package-lock.json ./
|
||||
COPY ./webpack.mix.js ./
|
||||
COPY ./resources/assets ./resources/assets
|
||||
|
||||
# Copy the app and build the assets
|
||||
COPY ./resources/assets /srv/resources/assets
|
||||
COPY ./public /srv/public
|
||||
COPY ./.babelrc /srv
|
||||
RUN npm run build
|
||||
RUN npm install
|
||||
RUN npm run production
|
||||
|
||||
RUN ls /srv/public/assets/dist/
|
||||
|
||||
# ================================
|
||||
# Prepare the final image
|
||||
@ -52,7 +51,9 @@ COPY --from=builder /app/bootstrap/cache /app/bootstrap/cache
|
||||
RUN php artisan vendor:publish --provider="Spatie\Backup\BackupServiceProvider"
|
||||
|
||||
# Copy files from the theme build
|
||||
COPY --from=npm_builder /srv/public /app/public
|
||||
COPY --from=npm_builder /srv/public/assets/dist/js /app/public/assets/dist/js
|
||||
COPY --from=npm_builder /srv/public/assets/dist/css /app/public/assets/dist/css
|
||||
COPY --from=npm_builder /srv/public/mix-manifest.json /app/public/mix-manifest.json
|
||||
|
||||
# Cleanup dev stuff from final image
|
||||
RUN rm -rf /app/node_modules
|
||||
|
4
webpack.mix.js
vendored
4
webpack.mix.js
vendored
@ -4,10 +4,10 @@ mix.options({
|
||||
processCssUrls: false
|
||||
});
|
||||
|
||||
mix.autoload({ 'jquery': ['window.$', 'window.jQuery'] });
|
||||
|
||||
mix.disableNotifications();
|
||||
|
||||
mix.setPublicPath('public');
|
||||
|
||||
mix.js('resources/assets/js/app.js', 'assets/dist/js');
|
||||
mix.js('resources/assets/js/fontawesome.js', 'assets/dist/js');
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user