-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (35 loc) · 1.08 KB
/
Makefile
File metadata and controls
48 lines (35 loc) · 1.08 KB
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
.PHONY: dev dev-backend dev-frontend gen build check clean docker-build docker-run helm-lint helm-template
STATUS_ADMIN_TOKEN ?= dev-token
STATUS_DB_PATH ?= $(CURDIR)/data/providers.db
STATUS_CORS_ORIGIN ?= http://localhost:5173
export STATUS_ADMIN_TOKEN
export STATUS_DB_PATH
export STATUS_CORS_ORIGIN
dev-backend:
cd backend && go run ./cmd/server
dev-frontend:
cd frontend && npm run dev
# Requires the backend to be running (for OpenAPI at :8080/openapi.json)
gen:
cd frontend && npm run gen
build:
cd backend && go build -o ../bin/status-aggregator ./cmd/server
cd frontend && npm run build
check:
cd backend && go vet ./... && go build ./...
cd frontend && npm run check
clean:
rm -rf bin data frontend/.svelte-kit frontend/build
IMAGE ?= ghcr.io/bueti/status-aggregator:dev
docker-build:
docker build -t $(IMAGE) .
docker-run:
mkdir -p data
docker run --rm -p 8080:8080 \
-e STATUS_ADMIN_TOKEN=$(STATUS_ADMIN_TOKEN) \
-v $(CURDIR)/data:/data \
$(IMAGE)
helm-lint:
helm lint charts/status-aggregator
helm-template:
helm template status charts/status-aggregator