-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
76 lines (62 loc) · 2.91 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
none:
@echo ERROR: Enter at least one target (start, start-load-balanced, start-full, start-infra-only, stop, build, rebuild, clean, fetch-modules)
# minimal setup (w/o observability/scaling etc...)
start:
docker compose -f docker-compose.yml up -d
# minimal setup using an existing external database (w/o observability/scaling etc...)
start-nodb:
docker compose -f docker-compose.nodb.yml up -d
# typical load balanced setup (multiple workers/backend)
start-load-balanced:
docker compose -f docker-compose.load_balanced.yml up -d
# full setup (load balanced, OTel, Prometheus/Grafana, etc...)
start-full:
docker compose -f docker-compose.full.yml up -d
# infra only (redis, postgres, flower)
start-infra: start-infra-only
start-infra-only:
docker compose -f docker-compose.infra_only.yml up -d
stop:
docker compose down
build:
docker compose build \
--build-arg GIT_COMMIT_HASH="$$(git rev-parse --short HEAD)" \
--build-arg VERSION="$$(cat .VERSION)"
rebuild: clean
docker compose build --no-cache \
--build-arg GIT_COMMIT_HASH="$$(git rev-parse --short HEAD)" \
--build-arg VERSION="$$(cat .VERSION)"
rebuild-frontend:
docker stop frontend || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-frontend:latest' | uniq) || true
docker compose build \
--build-arg GIT_COMMIT_HASH="$$(git rev-parse --short HEAD)" \
--build-arg VERSION="$$(cat .VERSION)"
rebuild-backend:
docker stop backend || true
docker stop worker || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-backend:latest' | uniq) || true
docker compose build \
--build-arg GIT_COMMIT_HASH="$$(git rev-parse --short HEAD)" \
--build-arg VERSION="$$(cat .VERSION)"
clean:
docker stop backend || true
docker stop worker || true
docker stop frontend || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-frontend:latest' | uniq) || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-backend:latest' | uniq) || true
docker image prune --all --force --filter=label=org.opencontainers.image.vendor="buildingSMART.org"
docker system prune --all --force --volumes --filter=label=org.opencontainers.image.vendor="buildingSMART.org"
clean-all:
docker stop backend || true
docker stop worker || true
docker stop frontend || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-frontend' | uniq) || true
docker rmi --force $$(docker images -q 'buildingsmart/validationsvc-backend' | uniq) || true
docker image prune --all --force --filter=label=org.opencontainers.image.vendor="buildingSMART.org"
docker system prune --all --force --volumes --filter=label=org.opencontainers.image.vendor="buildingSMART.org"
fetch-modules:
git submodule update --init --recursive
git submodule foreach git clean -f .
git submodule foreach git reset --hard
git submodule update --remote --recursive