Spaces:
Runtime error

vibe-coding-api / Dockerfile
Alcazard's picture
Commit changes
1fb5a13 verified
Raw History Blame Contribute Delete
913 Bytes
FROM php:8.2-apache
# Installer les extensions nécessaires
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
# Installer Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Copier les fichiers du projet
COPY . /var/www/html
# Donner les permissions
RUN chown -R www-data:www-data /var/www/html/var
# Activer mod_rewrite (pour Symfony)
RUN a2enmod rewrite
# Configuration du dossier public
ENV APACHE_DOCUMENT_ROOT /var/www/html/public
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
WORKDIR /var/www/html
RUN composer install --no-dev --optimize-autoloader