| FROM php:8.2-fpm |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| git \ |
| curl \ |
| libpng-dev \ |
| libonig-dev \ |
| libxml2-dev \ |
| zip \ |
| unzip \ |
| nginx \ |
| supervisor \ |
| ffmpeg \ |
| && apt-get clean && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN ffmpeg -version && ffprobe -version |
|
|
| |
| RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd |
|
|
| |
| COPY --from=composer:latest /usr/bin/composer /usr/bin/composer |
|
|
| |
| WORKDIR /var/www/html |
|
|
| |
| COPY . /var/www/html |
|
|
| |
| RUN composer install --no-dev --optimize-autoloader |
|
|
| |
| RUN chown -R www-data:www-data /var/www/html \ |
| && chmod -R 755 /var/www/html/storage \ |
| && chmod -R 755 /var/www/html/bootstrap/cache |
|
|
| |
| COPY docker/nginx/default.conf /etc/nginx/sites-available/default |
|
|
| |
| COPY docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf |
|
|
| |
| RUN mkdir -p /var/www/html/storage/app/public/hls \ |
| && chown -R www-data:www-data /var/www/html/storage/app/public/hls \ |
| && chmod -R 777 /var/www/html/storage/app/public/hls |
|
|
| |
| EXPOSE 80 |
|
|
| |
| CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"] |