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