-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (18 loc) · 704 Bytes
/
Dockerfile
File metadata and controls
25 lines (18 loc) · 704 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM php:8.1-apache
# Enable Apache modules
RUN a2enmod rewrite
# Install PHP extensions
RUN docker-php-ext-install pdo pdo_mysql
# Configure PHP for performance
RUN echo 'memory_limit = 256M' >> /usr/local/etc/php/conf.d/performance.ini && \
echo 'max_execution_time = 30' >> /usr/local/etc/php/conf.d/performance.ini && \
echo 'opcache.enable=1' >> /usr/local/etc/php/conf.d/performance.ini && \
echo 'opcache.memory_consumption=128' >> /usr/local/etc/php/conf.d/performance.ini
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY app/ /var/www/html/
# Set permissions
RUN chown -R www-data:www-data /var/www/html && \
chmod -R 755 /var/www/html
EXPOSE 80