add docker for server demo

This commit is contained in:
arifal
2025-06-26 18:28:26 +07:00
parent c33193d5f0
commit a7f578ca3d
23 changed files with 2420 additions and 431 deletions

View File

@@ -61,6 +61,7 @@ WORKDIR /var/www
# Install PHP extensions
RUN apt-get update && apt-get install -y \
git curl zip unzip libpng-dev libonig-dev libxml2-dev libzip-dev \
supervisor \
&& docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd zip
# Install Node.js
@@ -94,8 +95,15 @@ RUN php artisan config:clear \
RUN php artisan storage:link
# Create supervisor directories
RUN mkdir -p /var/log/supervisor /var/run/supervisor
# Copy supervisor configuration
COPY docker/supervisor/supervisord.conf /etc/supervisor/supervisord.conf
COPY docker/supervisor/laravel-production.conf /etc/supervisor/conf.d/laravel-production.conf
# Permissions
RUN chown -R www-data:www-data /var/www && chmod -R 755 /var/www/storage /var/www/public
EXPOSE 9000
CMD ["php-fpm"]
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]