Update Dockerfile.prod
This commit is contained in:
@@ -62,4 +62,21 @@ COPY --from=frontend /app/public ./public
|
|||||||
# Fix permissions for Laravel
|
# Fix permissions for Laravel
|
||||||
RUN chown -R www-data:www-data storage bootstrap/cache
|
RUN chown -R www-data:www-data storage bootstrap/cache
|
||||||
|
|
||||||
CMD ["php-fpm"]
|
# ----------------------------
|
||||||
|
# Stage 4: Nginx with built assets
|
||||||
|
# ----------------------------
|
||||||
|
FROM nginx:1.27-alpine AS final-nginx
|
||||||
|
|
||||||
|
WORKDIR /var/www/html
|
||||||
|
|
||||||
|
# Copy built public folder from final PHP image
|
||||||
|
COPY --from=final-php /var/www/html/public ./public
|
||||||
|
|
||||||
|
# Copy nginx config
|
||||||
|
COPY ./docker/nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose HTTP port
|
||||||
|
EXPOSE 80
|
||||||
|
|
||||||
|
# Start Nginx
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|||||||
Reference in New Issue
Block a user