Initial commit - Mini CMS complet (PHP + Docker + MinIO)
This commit is contained in:
24
forum-project/Dockerfile
Executable file
24
forum-project/Dockerfile
Executable file
@@ -0,0 +1,24 @@
|
||||
# Utilise PHP avec Apache intégré
|
||||
FROM php:8.2-apache
|
||||
|
||||
# Active les extensions MySQL nécessaires
|
||||
RUN docker-php-ext-install mysqli pdo pdo_mysql
|
||||
|
||||
# Installe Composer
|
||||
RUN apt-get update && apt-get install -y curl unzip \
|
||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
# Copie le code dans le répertoire web d'Apache
|
||||
COPY . /var/www/html/
|
||||
|
||||
# Fixe les permissions
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
# Augmente la taille d'upload autorisée
|
||||
RUN echo "upload_max_filesize=20M" > /usr/local/etc/php/conf.d/uploads.ini \
|
||||
&& echo "post_max_size=25M" >> /usr/local/etc/php/conf.d/uploads.ini \
|
||||
&& echo "memory_limit=256M" >> /usr/local/etc/php/conf.d/uploads.ini
|
||||
|
||||
Reference in New Issue
Block a user