-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
51 lines (43 loc) · 1.36 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
.PHONY: config deps build start stop clean
DOCKER=docker
BUILD=$(shell ls ./wrms-dash-build-funcs/build.sh 2>/dev/null || ls ../wrms-dash-build-funcs/build.sh 2>/dev/null)
SHELL:=/bin/bash
deps:
@test -n "$(BUILD)" || (echo 'wrms-dash-build-funcs not found; do you need "git submodule update --init"?'; false)
@echo "Using $(BUILD)"
config: deps
@$(BUILD) image pull-if-not-exists alpine
build: config
@for i in \
wrms-dash-frontend-db \
wrms-dash-frontend \
wrms-dash-nginx \
wrms-dash-api \
wrms-dash-sync \
; do \
make -C $$i $@; \
done
start:
@test -n "$$CONFIG" || (echo 'CONFIG not set, try "export CONFIG=`base64 < ./config/default.json`"'; false)
@test -n "$$DB_PASS" || (echo 'DB_PASS not set - try "export DB_PASS=`cat ./wrms-dash-frontend-db/pgpass`"'; false)
@for i in \
wrms-dash-frontend-db \
wrms-dash-api \
wrms-dash-sync \
wrms-dash-frontend \
wrms-dash-nginx \
; do \
make -C $$i $@; \
done
stop:
make -C wrms-dash-nginx $@ || :
make -C wrms-dash-api $@ || :
make -C wrms-dash-sync $@ || :
make -C wrms-dash-frontend $@ || :
make -C wrms-dash-frontend-db $@ || :
clean:
make -C wrms-dash-nginx $@ || :
make -C wrms-dash-api $@ || :
make -C wrms-dash-sync $@ || :
make -C wrms-dash-frontend $@ || :
make -C wrms-dash-frontend-db $@ || :