-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (32 loc) · 1.2 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
.PHONY: help
help:
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# =====================================================================
# Docker variables and exports ========================================
# =====================================================================
CURRENT_DIR = $(shell pwd)
USER_ID = $(shell id -u)
GROUP_ID = $(shell id -g)
export UID = $(USER_ID)
export GID = $(GROUP_ID)
# =====================
# Install =============
# =====================
install: ## install js dependencies
docker-compose run --no-deps --rm node bash -ci 'npm install'
# =====================
# Development =========
# =====================
.PHONY: start
start: ## start local dev environment in docker containers
docker-compose up -d --force-recreate
.PHONY: stop
stop: ## stop dockerised local dev environment
docker-compose down --rmi all
.PHONY: logs
logs: ## display dockerised local dev environment logs
docker-compose logs -f
connect-varnish: ## display dockerised local dev environment logs
docker-compose exec varnish ash
connect-node: ## display dockerised local dev environment logs
docker-compose exec node bash