35 lines
772 B
Docker
35 lines
772 B
Docker
FROM php:8.2-apache
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
git \
|
|
unzip \
|
|
libpq-dev \
|
|
libzip-dev \
|
|
zip \
|
|
curl \
|
|
python3 \
|
|
python3-pip \
|
|
&& docker-php-ext-install pdo pdo_pgsql pgsql zip
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
WORKDIR /var/www/html
|
|
|
|
COPY . /var/www/html
|
|
|
|
RUN composer install --no-dev --optimize-autoloader
|
|
|
|
RUN if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
RUN chown -R www-data:www-data /var/www/html \
|
|
&& chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache
|
|
|
|
COPY render-apache.conf /etc/apache2/sites-available/000-default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD php artisan config:clear && \
|
|
php artisan cache:clear && \
|
|
apache2-foreground |