-
Notifications
You must be signed in to change notification settings - Fork 43
/
Makefile
27 lines (19 loc) · 716 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
.PHONY: all install watch docker_build clean create_image serve
all: install
# Installs the dependencies and generates the JS bundle
install:
docker run --rm -it -v "${PWD}:/app" -w /app node:12 sh -c 'npm install && npm run-script build'
# Watches SCSS and JS for changes
watch:
docker run --rm -it -v "${PWD}:/app" -w /app node:12 npm run-script watch
build:
docker run --rm -it -v "${PWD}:/app" -w /app node:12 npm run-script build
# Build the image
docker_build:
docker build -t krakend/designer .
serve:
docker run --rm -d -p 8000:80 -v "${PWD}/designer:/usr/share/nginx/html" krakend/designer
clean:
rm -fr node_modules
# Create the official docker image
create_image: install docker_build clean