feat(docker): update docker, nginx config
Signed-off-by: miguel456 <me@nogueira.codes>
This commit is contained in:
17
Dockerfile
17
Dockerfile
@@ -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"]
|
||||
|
Reference in New Issue
Block a user