add docker for server demo
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user