Construction du front.
This commit is contained in:
parent
f9550c8de8
commit
583ffbb5c0
31
Dockerfile
31
Dockerfile
@ -1,3 +1,8 @@
|
|||||||
|
###
|
||||||
|
#
|
||||||
|
# Resolve php dependencies
|
||||||
|
#
|
||||||
|
###
|
||||||
FROM php:8.1-cli-alpine as vendor
|
FROM php:8.1-cli-alpine as vendor
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
@ -10,6 +15,27 @@ COPY composer.lock composer.lock
|
|||||||
# Install php dependencies
|
# Install php dependencies
|
||||||
RUN composer install --quiet --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
|
RUN composer install --quiet --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
|
||||||
|
|
||||||
|
###
|
||||||
|
#
|
||||||
|
# Build assets
|
||||||
|
#
|
||||||
|
###
|
||||||
|
FROM node:16-alpine as frontend
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN mkdir -p /app/public
|
||||||
|
|
||||||
|
COPY package.json package-lock.json webpack.mix.js tailwind.config.js /app/
|
||||||
|
COPY resources/ /app/resources/
|
||||||
|
|
||||||
|
RUN npm ci && npm run prod
|
||||||
|
|
||||||
|
###
|
||||||
|
#
|
||||||
|
# Build app
|
||||||
|
#
|
||||||
|
###
|
||||||
FROM php:8.1-apache-buster
|
FROM php:8.1-apache-buster
|
||||||
|
|
||||||
# Set working directory
|
# Set working directory
|
||||||
@ -54,3 +80,8 @@ COPY --chown=www-data:www-data . /app
|
|||||||
|
|
||||||
# Copy vendor
|
# Copy vendor
|
||||||
COPY --from=vendor --chown=www-data:www-data /app/vendor/ /app/vendor/
|
COPY --from=vendor --chown=www-data:www-data /app/vendor/ /app/vendor/
|
||||||
|
|
||||||
|
# Copy assets
|
||||||
|
COPY --from=frontend --chown=www-data:www-data /app/public/js/ /app/public/js/
|
||||||
|
COPY --from=frontend --chown=www-data:www-data /app/public/css/ /app/public/css/
|
||||||
|
COPY --from=frontend --chown=www-data:www-data /app/mix-manifest.json /app/mix-manifest.json
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user