-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
47 lines (33 loc) · 889 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
42
43
44
45
46
47
CONTAINER_NAME=fingerstyle-frontend-dev-container
DOCKER_COMPOSE_OPTS= -f docker-compose.dev.yml
define docker_compose_run
@docker-compose $(DOCKER_COMPOSE_OPTS) run frontend sh -c "$(1)"
endef
define docker_compose
@docker-compose $(DOCKER_COMPOSE_OPTS) $(1)
endef
env:
@echo CONTAINER_NAME=$(CONTAINER_NAME) > .env
build:
@docker build --no-cache --target dev -t fingerstyle-frontend-dev .
setup: env build
up:
$(call docker_compose, up -d)
restart:
$(call docker_compose, restart)
down:
$(call docker_compose, down)
# docker_compose_run example
# test:
# $(call docker_compose_run, echo 123)
build-production:
@docker build -t fingerstyle-frontend .
start-production:
@docker-compose up -d
restart-production:
@docker-compose down
@docker-compose up -d
prettier:
$(call docker_compose_run, yarn run prettier)
lint:
$(call docker_compose_run, yarn run lint)