Update Dockerfile to use supervisord for process management
This commit is contained in:
+5
-3
@@ -1,19 +1,21 @@
|
|||||||
FROM php:8.2-fpm-alpine
|
FROM php:8.2-fpm-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache nginx nodejs npm \
|
RUN apk add --no-cache nginx nodejs npm supervisor \
|
||||||
&& docker-php-ext-install pdo pdo_mysql mysqli bcmath
|
&& docker-php-ext-install pdo pdo_mysql mysqli bcmath
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||||
RUN composer install --no-dev --optimize-autoloader
|
RUN composer install --optimize-autoloader
|
||||||
|
|
||||||
RUN npm ci && npm run build
|
RUN npm ci && npm run build
|
||||||
|
|
||||||
RUN mkdir -p storage/framework/{sessions,views,cache} \
|
RUN mkdir -p storage/framework/{sessions,views,cache} \
|
||||||
&& chmod -R 775 storage bootstrap/cache
|
&& chmod -R 775 storage bootstrap/cache
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisord.conf
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=8080"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]
|
||||||
|
|||||||
Reference in New Issue
Block a user