-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (21 loc) · 751 Bytes
/
Makefile
File metadata and controls
27 lines (21 loc) · 751 Bytes
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
ASSETS := $(wildcard assets/*)
.PHONY: assets
.dist: $(ASSETS)
mkdir -p dist
cp $(ASSETS) dist/
touch .assets
.image: Dockerfile .dist
docker build --network host --tag teach-coding .
touch .image
bash: .image
docker run --rm -it -u $(shell id -u):$(shell id -g) -v $$PWD:/app teach-coding bash
up: .image
docker run -d -p 8080:8080 -v $$PWD:/app --name teach-coding-srv teach-coding websocketd --port 8080 --staticdir dist ./app.py || true
docker run -d -v $$PWD:/app --name teach-coding-webpack teach-coding webpack --watch || true
down:
docker stop teach-coding-srv || true
docker stop teach-coding-webpack || true
docker rm teach-coding-srv || true
docker rm teach-coding-webpack || true
logs:
@ docker logs -f teach-coding-srv