File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ Performence accroding to [Spa-to-http vs Nginx benchmark (End of the post)](http
42
42
Create ` Dockerfile ` in yoru SPA directory (near ` package.json ` ):
43
43
44
44
```
45
- FROM node:16 -alpine as builder
45
+ FROM node:20 -alpine as builder
46
46
WORKDIR /code/
47
47
ADD package-lock.json .
48
48
ADD package.json .
@@ -54,6 +54,12 @@ FROM devforth/spa-to-http:latest
54
54
COPY --from=builder /code/dist/ .
55
55
```
56
56
57
+ Test it locally:
58
+
59
+ ``` sh
60
+ docker build -q . | xargs docker run --rm -p 8080:8080
61
+ ```
62
+
57
63
So we built our frontend and included it into container based on Spa-to-http. This way gives us great benefits:
58
64
59
65
* We build frontend in docker build time and improve build time for most changes (npm ci is not getting rebuild if there is no new packages)
You can’t perform that action at this time.
0 commit comments