feat(docker): update docker, nginx config

Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
2023-08-07 21:56:09 +01:00
parent 9dc82708dd
commit c48db3f435
5 changed files with 30 additions and 34 deletions

View File

@@ -1,7 +1,5 @@
# Use the official PHP-FPM image as the base image
FROM php:8.1-fpm
# Install system dependencies
RUN apt-get update && apt-get install -y \
libpng-dev \
libjpeg-dev \
@@ -14,25 +12,18 @@ RUN apt-get update && apt-get install -y \
libmagickwand-dev \
&& pecl install imagick \
&& docker-php-ext-enable imagick
# Remove xdebug later
# Install PHP extensions
RUN docker-php-ext-install gd pdo pdo_mysql zip curl mbstring xml
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
# Set the working directory in the container
WORKDIR /var/www/html
# Copy the Laravel application files to the container
COPY . .
# Install Composer (if you haven't installed it globally on your host machine)
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Install/update application dependencies using Composer
RUN composer update && composer install
RUN npm ci
# Expose port 9000 to connect to the PHP-FPM server
EXPOSE 9000
# Start PHP-FPM to serve the Laravel application
CMD ["php-fpm"]