This commit is contained in:
Saufi
2026-06-02 17:35:45 +08:00
commit 4ef99b1f81
148 changed files with 21134 additions and 0 deletions

52
Dockerfile Normal file
View File

@@ -0,0 +1,52 @@
FROM php:8.4-fpm
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
libzip-dev \
zip \
unzip \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
# Install PHP extensions
RUN docker-php-ext-install \
pdo_mysql \
mbstring \
exif \
pcntl \
bcmath \
gd \
zip \
opcache
# Install Redis extension
RUN pecl install redis && docker-php-ext-enable redis
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
# Copy application files
COPY . .
# Install PHP dependencies (production only)
RUN composer install --optimize-autoloader --no-dev --no-interaction
# 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 custom php.ini
COPY docker/php/php.ini /usr/local/etc/php/conf.d/app.ini
EXPOSE 9000
CMD ["php-fpm"]