myiptv / Dockerfile
ken1402's picture
Upload 73 files
8baf129 verified
Raw
History Blame Contribute Delete
1.41 kB
FROM php:8.2-fpm
# Install system dependencies
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/*
# Verify FFmpeg and FFprobe installation
RUN ffmpeg -version && ffprobe -version
# Install PHP extensions
RUN docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . /var/www/html
# Install dependencies
RUN composer install --no-dev --optimize-autoloader
# Set permissions
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 nginx configuration
COPY docker/nginx/default.conf /etc/nginx/sites-available/default
# Copy supervisor configuration
COPY docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Create HLS directory
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 port 80
EXPOSE 80
# Start supervisor
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]