-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile
79 lines (63 loc) · 1.28 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
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
ifneq ("$(wildcard docker-compose.dev.override.yml)","")
dev-%: export COMPOSE_FILE = docker-compose.dev.yml:docker-compose.dev.override.yml
else
dev-%: export COMPOSE_FILE = docker-compose.dev.yml
endif
dev-%: export NODE_BIN = /app/node_modules/nodemon/bin/nodemon.js
dev-%:
$(MAKE) $*
.PHONY: pull
pull:
docker-compose pull
.PHONY: init
init:
docker-compose run \
--rm \
--name osl_app_install \
-u $$(id -u) app \
sh -c 'yarn install && cd client && yarn install'
.PHONY: config
config:
docker-compose config
.PHONY: upd
upd:
docker-compose up -d $(args)
.PHONY: upd-force
upd-force:
docker-compose up -d --force-recreate $(args)
.PHONY: restart
restart:
docker-compose restart $(args)
.PHONY: stop
stop:
docker-compose stop
.PHONY: down
down:
docker-compose down
.PHONY: build
build:
docker-compose build $(args)
.PHONY: shell
shell:
docker-compose exec -u $$(id -u) app bash
.PHONY: shell-root
shell-root:
docker-compose exec app bash
.SILENT:
.PHONY: cli
cli:
@docker-compose exec -u $$(id -u) app node ./cli.js $(cmd)
.PHONY: ps
ps:
docker-compose ps
.PHONY: logs
logs:
docker-compose logs
.PHONY: logs-follow
logs-follow:
docker-compose logs -f --tail=200 app
.PHONY: watch
watch:
docker-compose exec \
-u $$(id -u) app \
sh -c 'cd /app/client && yarn serve'