Skip to content

Commit bd06033

Browse files
committed
addf readme
1 parent 29c1c51 commit bd06033

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Performence accroding to [Spa-to-http vs Nginx benchmark (End of the post)](http
4242
Create `Dockerfile` in yoru SPA directory (near `package.json`):
4343

4444
```
45-
FROM node:16-alpine as builder
45+
FROM node:20-alpine as builder
4646
WORKDIR /code/
4747
ADD package-lock.json .
4848
ADD package.json .
@@ -54,6 +54,12 @@ FROM devforth/spa-to-http:latest
5454
COPY --from=builder /code/dist/ .
5555
```
5656

57+
Test it locally:
58+
59+
```sh
60+
docker build -q . | xargs docker run --rm -p 8080:8080
61+
```
62+
5763
So we built our frontend and included it into container based on Spa-to-http. This way gives us great benefits:
5864

5965
* 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)

0 commit comments

Comments
 (0)