File tree Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Expand file tree Collapse file tree 2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ COPY /resources/ /app/resources/
12
12
# Build using Vite.js
13
13
RUN npm run build
14
14
15
+ # Final Image
15
16
FROM nginx:1-alpine
16
17
17
18
WORKDIR /app/public
Original file line number Diff line number Diff line change 1
1
# Composer installation
2
2
FROM php:8.2-fpm AS composer
3
-
4
3
WORKDIR /app
5
-
4
+ # # Install Composer
6
5
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
7
6
RUN install-php-extensions @composer
8
-
7
+ # # Install dependencies
9
8
COPY / /app
10
9
RUN composer install --optimize-autoloader --no-dev
11
10
12
11
# Vite.js build
13
12
FROM node:lts-alpine AS node
14
-
15
13
WORKDIR /app
16
-
17
- # Cache layer for "npm ci"
14
+ # # Cache layer for "npm ci"
18
15
COPY /package.json /package-lock.json /app/
19
16
RUN npm ci
20
- # Copy JavaScript
17
+ # # Copy JavaScript
21
18
COPY /vite.config.js /app/
22
19
COPY /resources/ /app/resources/
23
- # Build using Vite.js
20
+ # # Build using Vite.js
24
21
RUN npm run build
25
22
26
23
# Final Image
@@ -32,7 +29,7 @@ RUN install-php-extensions bcmath pdo_pgsql redis
32
29
WORKDIR /app
33
30
34
31
COPY / /app
35
- COPY --from=node /app/public/build /app/public/build/
32
+ COPY --from=node /app/public/build/ /app/public/build/
36
33
COPY --from=composer /app/vendor/ /app/vendor/
37
34
38
35
RUN chown --recursive www-data:www-data /app/storage
You can’t perform that action at this time.
0 commit comments