-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (25 loc) · 830 Bytes
/
Makefile
File metadata and controls
36 lines (25 loc) · 830 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
.PHONY: build run clean docker-build docker-run docker-stop reset-db
APP := phantomshop
PORT := 9000
## ── Local ──────────────────────────────────
build:
go build -o $(APP) ./cmd/server/
run: build
./$(APP) -addr :$(PORT)
clean:
rm -f $(APP)
rm -f build/server
reset-db:
rm -f data/shop.db
@echo "Database reset — will re-seed on next start."
## ── Docker ─────────────────────────────────
docker-build:
docker build -t $(APP) .
docker-run:
docker compose up -d
@echo "PhantomShop running at http://localhost:$(PORT)"
docker-stop:
docker compose down
docker-reset:
docker compose down -v
@echo "Volumes removed — database will re-seed on next start."