This repository has been archived on 2024-04-29. You can view files and clone it, but cannot push or open issues or pull requests.
reacttest/Makefile

23 lines
557 B
Makefile
Raw Normal View History

2019-03-03 14:12:58 +00:00
COMPOSE:=docker-compose
CANARY:=node_modules/.yarn-integrity
.PHONY: all
all: develop
%/$(CANARY):
$(eval image:=$(patsubst %/$(CANARY),%,$@))
$(COMPOSE) build $(image)
$(COMPOSE) run --rm $(image) yarn install --production=false
DFILES:=$(wildcard */Dockerfile)
IMAGES:=$(patsubst %/Dockerfile,%,$(DFILES))
.PHONY: develop
develop: $(patsubst %,%/$(CANARY),$(IMAGES))
$(COMPOSE) up
.PHONY: production
production:
$(COMPOSE) -f docker-compose.yml -f docker-compose.prod.yml build
$(COMPOSE) -f docker-compose.yml -f docker-compose.prod.yml up -d