up
This commit is contained in:
+3
-1
@@ -4,12 +4,12 @@
|
|||||||
.gitattributes
|
.gitattributes
|
||||||
node_modules
|
node_modules
|
||||||
vendor
|
vendor
|
||||||
|
public/build
|
||||||
storage/framework/cache/data
|
storage/framework/cache/data
|
||||||
storage/framework/sessions
|
storage/framework/sessions
|
||||||
storage/framework/views
|
storage/framework/views
|
||||||
storage/logs
|
storage/logs
|
||||||
storage/app/public
|
storage/app/public
|
||||||
public/build
|
|
||||||
.dockerignore
|
.dockerignore
|
||||||
docker-compose.yml
|
docker-compose.yml
|
||||||
*.md
|
*.md
|
||||||
@@ -17,3 +17,5 @@ docker-compose.yml
|
|||||||
phpunit.xml
|
phpunit.xml
|
||||||
tests
|
tests
|
||||||
scripts
|
scripts
|
||||||
|
bootstrap/cache/*.php
|
||||||
|
!bootstrap/cache/.gitkeep
|
||||||
|
|||||||
+29
-8
@@ -1,10 +1,30 @@
|
|||||||
FROM php:8.2-alpine
|
FROM composer:2 AS vendor
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY composer.json composer.lock ./
|
||||||
|
RUN composer install \
|
||||||
|
--no-dev \
|
||||||
|
--optimize-autoloader \
|
||||||
|
--no-interaction \
|
||||||
|
--no-scripts \
|
||||||
|
--no-autoloader
|
||||||
|
|
||||||
|
FROM node:22-alpine AS frontend
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY resources/ resources/
|
||||||
|
COPY vite.config.js ./
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM php:8.2-fpm-alpine
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
postgresql-dev \
|
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
supervisor \
|
||||||
curl \
|
curl \
|
||||||
|
postgresql-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libjpeg-turbo-dev \
|
libjpeg-turbo-dev \
|
||||||
freetype-dev \
|
freetype-dev \
|
||||||
@@ -18,16 +38,15 @@ WORKDIR /app
|
|||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
RUN composer install --no-dev --optimize-autoloader --no-interaction \
|
COPY --from=vendor /app/vendor vendor/
|
||||||
|
COPY --from=frontend /app/public/build public/build/
|
||||||
|
|
||||||
|
RUN composer dump-autoload --no-dev --optimize \
|
||||||
&& php artisan storage:link \
|
&& php artisan storage:link \
|
||||||
|
&& php artisan package:discover --ansi \
|
||||||
&& chmod -R 775 storage bootstrap/cache \
|
&& chmod -R 775 storage bootstrap/cache \
|
||||||
&& chown -R www-data:www-data storage bootstrap/cache
|
&& chown -R www-data:www-data storage bootstrap/cache
|
||||||
|
|
||||||
RUN apk add --no-cache nodejs npm \
|
|
||||||
&& npm ci && npm run build \
|
|
||||||
&& rm -rf node_modules \
|
|
||||||
&& apk del nodejs npm
|
|
||||||
|
|
||||||
COPY docker/nginx.conf /etc/nginx/http.d/default.conf
|
COPY docker/nginx.conf /etc/nginx/http.d/default.conf
|
||||||
COPY docker/supervisord.conf /etc/supervisor.conf
|
COPY docker/supervisord.conf /etc/supervisor.conf
|
||||||
|
|
||||||
@@ -35,4 +54,6 @@ RUN echo "* * * * * php /app/artisan schedule:run >> /dev/null 2>&1" > /etc/cron
|
|||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
STOPSIGNAL SIGQUIT
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor.conf"]
|
||||||
|
|||||||
Reference in New Issue
Block a user