forked from mcagov/beacons
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (53 loc) · 1.48 KB
/
Makefile
File metadata and controls
64 lines (53 loc) · 1.48 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
###
# Makefile for local development - Start developing Beacons with just one command
#
# $ make
#
###
# Run jobs in parallel so we can see log output
MAKEFLAGS += -j
.PHONY: setup
setup: setup-root setup-backoffice setup-webapp
.PHONY: setup-root
setup-root:
@echo "⏭ Installing root level dependencies and commit hooks..."
@cd ./ && npm install
.PHONY: setup-backoffice
setup-backoffice:
@echo "⏭ Installing backoffice dependencies..."
@cd ./backoffice && npm install
.PHONY: setup-webapp
setup-webapp:
@echo "⏭ Installing webapp dependencies..."
@cd ./webapp && npm install
##
# Applications
##
.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