added docker files and update roster form
This commit is contained in:
21
Dockerfile
21
Dockerfile
@@ -15,17 +15,15 @@ RUN apk --update --no-cache add \
|
||||
&& docker-php-ext-install gd pdo pdo_mysql zip mcrypt
|
||||
|
||||
# Set the working directory in the container
|
||||
WORKDIR /var/www/html
|
||||
WORKDIR /var/www
|
||||
|
||||
# Copy Nginx config
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
COPY entrypoint.sh /etc/entrypoint.sh
|
||||
RUN chmod +x /etc/entrypoint.sh
|
||||
RUN mkdir -p /run/nginx
|
||||
# Clear cache
|
||||
# RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy the Laravel application files to the container
|
||||
COPY . .
|
||||
|
||||
|
||||
# Set appropriate permissions for Laravel storage and bootstrap cache
|
||||
RUN chown -R www-data:www-data storage bootstrap
|
||||
|
||||
@@ -33,7 +31,7 @@ RUN chown -R www-data:www-data storage bootstrap
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# Install Laravel dependencies
|
||||
RUN composer install
|
||||
RUN composer install --no-plugins --no-scripts
|
||||
|
||||
# Generate Laravel application key
|
||||
RUN php artisan key:generate
|
||||
@@ -44,9 +42,6 @@ RUN mkdir -p /run/php && chown www-data:www-data /run/php
|
||||
# Copy the www.conf file to PHP-FPM pool.d directory
|
||||
COPY www.conf /usr/local/etc/php-fpm.d/www.conf
|
||||
|
||||
# Expose port 9000 for PHP-FPM
|
||||
EXPOSE 80
|
||||
EXPOSE 9001
|
||||
|
||||
# Start PHP-FPM
|
||||
ENTRYPOINT ["/etc/entrypoint.sh"]
|
||||
# Expose port 9000 and start php-fpm server
|
||||
EXPOSE 9000
|
||||
CMD ["php-fpm"]
|
||||
Reference in New Issue
Block a user