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