-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathMakefile
48 lines (41 loc) · 1.18 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
default:
$(info Make target options:)
$(info `make start` to run the ODE)
$(info `make build` to build the ODE)
$(info `make stop` to stop the ODE)
$(info `make delete` to stop the ODE and remove the volumes)
$(info `make restart` to stop and then start the ODE)
$(info `make rebuild` to stop, delete, and then rebuild the containers)
$(info `make clean-build` to rebuild the containers without using the cache)
.PHONY: start
start:
ifeq ("$(wildcard .env)", "")
$(error "ERROR: jpo-ode Environment file `.env` not found in ${PWD}")
endif
ifeq ("$(wildcard ./jpo-utils/.env)", "")
$(error "ERROR: jpo-utils Environment file `.env` not found in ${PWD}")
endif
docker compose up -d
build:
ifeq ("$(wildcard .env)", "")
$(error "ERROR: jpo-ode Environment file `.env` not found in ${PWD}")
endif
ifeq ("$(wildcard ./jpo-utils/.env)", "")
$(error "ERROR: jpo-utils Environment file `.env` not found in ${PWD}")
endif
docker compose build
.PHONY: stop
stop:
docker compose down
.PHONY: delete
delete:
docker compose down -v
.PHONY: restart
restart:
$(MAKE) stop start
.PHONY: rebuild
rebuild:
$(MAKE) stop delete build start
.PHONY: clean-build
clean-build:
docker compose build --no-cache