You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently use Cloud Run from google and we use apline linux like as noted here. Can we do something similar for Delpoy Now?
Alpine linux 54mb the entire deployment is about 160mb.
# Use the official PHP 8.1 image as the base image
FROM php:8.1-fpm-alpine
# Install system dependencies required by Laravel
RUN apk --no-cache add \
libpng-dev \
libjpeg-turbo-dev \
freetype-dev \
zip \
unzip \
curl-dev \
libzip-dev \
nodejs \
npm
# Install PHP extensions required by Laravel
RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd pdo pdo_mysql exif zip opcache
# Install Composer (a PHP dependency manager)
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set the working directory to /var/www/html
WORKDIR /var/www/html
# Copy the Laravel application files to the container
COPY . .
# Install Laravel dependencies using Composer
RUN composer install --no-interaction
# Install Node.js dependencies and compile assets
RUN npm install && npm run prod
# Configure OPcache settings (you may adjust these based on your needs)
RUN echo "opcache.enable=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo "opcache.memory_consumption=128" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo "opcache.max_accelerated_files=10000" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo "opcache.validate_timestamps=0" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini
# Expose port 8080 to listen to incoming requests (for Google Cloud Run)
ENV PORT 8080
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We currently use Cloud Run from google and we use apline linux like as noted here. Can we do something similar for Delpoy Now?
Alpine linux 54mb the entire deployment is about 160mb.
Beta Was this translation helpful? Give feedback.
All reactions