File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,23 @@ bootstrap/cache/*
2020public /hot /*
2121public /storage /*
2222storage /* .key
23+ storage /app /*
24+ ! storage /app /public
25+ storage /app /public /*
26+ storage /logs /*
27+ storage /framework /compiled.php
28+ storage /framework /config.php
29+ storage /framework /down
30+ storage /framework /events.scanned.php
31+ storage /framework /maintenance.php
32+ storage /framework /routes.php
33+ storage /framework /routes.scanned.php
34+ storage /framework /schedule- *
35+ storage /framework /services.json
36+ storage /framework /cache /*
37+ storage /framework /sessions /*
38+ storage /framework /testing /*
39+ storage /framework /views /*
2340.env.backup
2441.env.production
2542Homestead.json
Original file line number Diff line number Diff line change @@ -28,11 +28,14 @@ jobs:
2828 build-and-push-image :
2929 strategy :
3030 fail-fast : false
31+ max-parallel : 1
3132 matrix :
3233 include :
33- - dockerfile : ./ngnix.Dockerfile
34+ - dockerfile : ./Dockerfile
35+ target : nginx
3436 image : ghcr.io/kduma-oss/webprint-server/nginx
35- - dockerfile : ./php.Dockerfile
37+ - dockerfile : ./Dockerfile
38+ target : fpm
3639 image : ghcr.io/kduma-oss/webprint-server/fpm
3740
3841 runs-on : ubuntu-latest
8891 with :
8992 context : ${{ matrix.context }}
9093 file : ${{ matrix.dockerfile }}
94+ target : ${{ matrix.target }}
9195 push : ${{ github.event_name != 'pull_request' }}
9296 tags : ${{ steps.meta.outputs.tags }}
9397 labels : ${{ steps.meta.outputs.labels }}
Original file line number Diff line number Diff line change 1+ FROM php:8.1-cli-alpine AS composer_stage
2+
3+ WORKDIR /var/www/html
4+
5+ COPY --from=composer /usr/bin/composer /usr/bin/composer
6+
7+ COPY composer.json composer.lock ./
8+ RUN composer install --ignore-platform-reqs --prefer-dist --no-scripts --no-progress --no-interaction --no-dev --no-autoloader
9+
10+ COPY . ./
11+ RUN composer dump-autoload --optimize --apcu --no-dev
12+ RUN php artisan view:cache
13+
14+
115FROM node:19-alpine AS vite_stage
216
317WORKDIR /var/www/html
418
519COPY package.json package-lock.json ./
620RUN npm ci
721
22+ COPY --from=composer_stage /var/www/html/vendor /var/www/html/vendor
23+ COPY --from=composer_stage /var/www/html/storage/framework/views/ /var/www/html/storage/framework/views/
824COPY postcss.config.js tailwind.config.js vite.config.js ./
925COPY resources ./resources
1026RUN npm run build
1127
1228
1329
1430
15-
16- FROM php:8.1-cli-alpine AS composer_stage
31+ FROM nginx:alpine AS ngnix
1732
1833WORKDIR /var/www/html
1934
20- COPY --from=composer /usr/bin/composer /usr/bin/composer
35+ COPY docker/nginx/default.conf /etc/nginx/conf.d
36+
37+ COPY --from=vite_stage /var/www/html/public/build /var/www/html/public/build
38+
39+ COPY ./ /var/www/html/
40+
2141
22- COPY composer.json composer.lock ./
23- RUN composer install --ignore-platform-reqs --prefer-dist --no-scripts --no-progress --no-interaction --no-dev --no-autoloader
2442
25- COPY . ./
26- RUN composer dump-autoload --optimize --apcu --no-dev
2743
2844
2945
30- FROM php:8.1-fpm-alpine
46+ FROM php:8.1-fpm-alpine AS fpm
3147
3248WORKDIR /var/www/html
3349
Original file line number Diff line number Diff line change @@ -3,7 +3,8 @@ services:
33 nginx :
44 build :
55 context : .
6- dockerfile : ngnix.Dockerfile
6+ dockerfile : Dockerfile
7+ target : ngnix
78 image : ghcr.io/kduma-oss/webprint-server/nginx
89 restart : always
910 ports :
@@ -16,7 +17,8 @@ services:
1617 php :
1718 build :
1819 context : .
19- dockerfile : php.Dockerfile
20+ dockerfile : Dockerfile
21+ target : fpm
2022 image : ghcr.io/kduma-oss/webprint-server/fpm
2123 restart : always
2224 networks :
@@ -31,6 +33,8 @@ services:
3133 - DB_USERNAME=webprint_server
3234 - DB_PASSWORD=${DB_PASSWORD}
3335
36+ - APP_DEBUG=true
37+ - LOG_LEVEL=errorlog
3438 - APP_KEY=${APP_KEY}
3539
3640 db :
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments