aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Dockerfile11
-rw-r--r--Makefile4
-rw-r--r--README.md10
3 files changed, 19 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 15ee3a9..5a5f92f 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,2 +1,11 @@
1FROM mhart/alpine-node:14 as builder
2
3WORKDIR /tmp
4COPY . .
5
6RUN yarn && yarn build
7
8###
9# production image
1FROM nginx:stable-alpine 10FROM nginx:stable-alpine
2COPY build /usr/share/nginx/html 11COPY --from=builder /tmp/build /usr/share/nginx/html
diff --git a/Makefile b/Makefile
index 6386336..421bb16 100644
--- a/Makefile
+++ b/Makefile
@@ -7,8 +7,6 @@ all: dev
7 7
8.PHONY: build 8.PHONY: build
9build: 9build:
10 yarn
11 yarn build
12 docker build -t $(TAG_LATEST) . 10 docker build -t $(TAG_LATEST) .
13 11
14.PHONY: dev 12.PHONY: dev
@@ -17,7 +15,7 @@ dev:
17 yarn start 15 yarn start
18 16
19.PHONY: run 17.PHONY: run
20run: build 18run:
21 docker run --rm -p 8080:80 $(TAG_LATEST) 19 docker run --rm -p 8080:80 $(TAG_LATEST)
22 20
23.PHONY: publish 21.PHONY: publish
diff --git a/README.md b/README.md
index 704442c..1e205dc 100644
--- a/README.md
+++ b/README.md
@@ -13,10 +13,16 @@ It looks like this:
13Run the latest Docker image on http://localhost:8080 13Run the latest Docker image on http://localhost:8080
14 14
15``` 15```
16docker run --rm -p 8080:80 bndw/wifi-card:latest 16make run
17``` 17```
18 18
19Or run the live-reload server on http://localhost:8080 19Build the Docker image
20
21```
22make build
23```
24
25Run the live-reload server on http://localhost:8080
20 26
21``` 27```
22make dev 28make dev