split steps
This commit is contained in:
@@ -29,12 +29,15 @@ WORKDIR /var/www/html
|
|||||||
# Copy composer files
|
# Copy composer files
|
||||||
COPY composer.json composer.lock ./
|
COPY composer.json composer.lock ./
|
||||||
|
|
||||||
# Install PHP dependencies
|
# Install PHP dependencies (without optimization)
|
||||||
RUN composer install --no-dev --optimize-autoloader
|
RUN composer install --no-dev --no-scripts
|
||||||
|
|
||||||
# Copy application code
|
# Copy application code
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
|
# Generate optimized autoloader now that source code is present
|
||||||
|
RUN composer dump-autoload --optimize
|
||||||
|
|
||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user