-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (68 loc) · 1.87 KB
/
Makefile
File metadata and controls
81 lines (68 loc) · 1.87 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
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
77
78
79
80
81
###
# Makefile for local development - Start developing Beacons with just one command
#
# $ make
#
###
MAKEFLAGS += -j
.PHONY: setup
setup: setup-root setup-backoffice setup-webapp
asdf plugin add nodejs
.PHONY: setup-root
setup-root:
@echo "\n==================================================="
@echo "Installing root level dependencies and commit hooks\n"
cd . && \
asdf install && \
node --version && \
npm install
.PHONY: setup-backoffice
setup-backoffice:
@echo "\n=================================="
@echo "Installing backoffice dependencies\n"
cd ./backoffice && \
asdf install && \
node --version && \
npm install
.PHONY: setup-webapp
setup-webapp:
@echo "\n=============================="
@echo "Installing webapp dependencies\n"
cd ./webapp && \
asdf install && \
node --version && \
npm install
##
# Applications
##
# We are using --jobs so that all jobs run in parallel
# Without this flag, the first job hogs the terminal and the others don't run
MAKEFLAGS += --jobs
.PHONY: serve
serve: serve-backing-services serve-webapp serve-backoffice serve-backoffice-stubs
.PHONY: serve-webapp
serve-webapp:
@echo "⏭ Starting the NextJS Webapp in dev mode..."
@cd ./webapp && npm run dev
.PHONY: serve-backoffice
serve-backoffice:
@echo "💅 Starting the Backoffice in dev mode..."
@cd ./backoffice && npm run start
##
# Backing services
##
.PHONY: serve-backing-services
serve-backing-services:
@echo "🐳 Starting Postgres, Redis and OpenSearch..."
# Don't try separating these. Docker compose does not like working in parallel, so they all need to come up at once
@docker compose up postgres redis opensearch opensearch-proxy opensearch-dashboards service --build
.PHONY: serve-backoffice-stubs
serve-backoffice-stubs:
@echo "🎫 Starting the Backoffice stub server..."
@node ./backoffice/stubs.js
##
# Utils
##
.PHONY: clean
clean:
docker compose down