-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
50 lines (33 loc) · 867 Bytes
/
Copy pathmakefile
File metadata and controls
50 lines (33 loc) · 867 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# ===== CONFIG =====
BUILD_DIR = docs/.vitepress/dist
DEPLOY_PATH = dist
CONTAINER = bobdocs
# ===== SETUP =====
setup:
docker pull nginx:latest
# ===== COMMANDS =====
install:
npm ci
build:
npm run build
deploy:
rm -rf $(DEPLOY_PATH)
cp -r $(BUILD_DIR) $(DEPLOY_PATH)
# ===== CONTAINER =====
serve:
- docker rm -f $(CONTAINER) >/dev/null 2>&1 || true
docker run -d --name $(CONTAINER) -p 3000:80 -v $$(pwd)/$(DEPLOY_PATH):/usr/share/nginx/html:ro -v $$(pwd)/nginx/default.conf:/etc/nginx/conf.d/default.conf:ro --restart unless-stopped nginx:latest
restart:
docker restart $(CONTAINER)
stop:
docker stop $(CONTAINER)
logs:
docker logs -f $(CONTAINER)
# ===== TUNNEL =====
tunnel:
cloudflared tunnel run bobdyn
# ===== DEBUG =====
check:
curl -I http://localhost:3000
# ===== MAIN ENTRYPOINT =====
full-deploy: install build deploy serve