-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
41 lines (32 loc) · 951 Bytes
/
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
UID := $(shell id -u)
GID := $(shell id -g)
CONTAINER := "node-api-users"
build:
$(info Make: Building environment image.)
UID=$(UID) GID=$(GID) docker-compose build --no-cache
@make -s clean
up:
$(info Make: Starting environment containers.)
UID=$(UID) GID=$(GID) docker-compose up -d
down:
$(info Make: Stopping environment containers.)
@docker-compose stop
restart:
$(info Make: Restarting environment containers.)
@make -s down
@make -s up
init:
$(info Make: Initializing environment.)
@docker exec -u www-data $(CONTAINER) cp .env.example .env
@docker exec -u www-data $(CONTAINER) npm install
tests:
$(info Make: Starting environment tests.)
$(info Not yet implemented)
docs:
$(info Make: Build code documentation.)
@docker exec -u node $(CONTAINER) npx typedoc --out docs src/index.ts
shell:
$(info Make: Starting environment shell.)
@docker exec -it $(CONTAINER) sh
clean:
@docker system prune --volumes --force