diff --git a/Makefile b/Makefile index e81b88f..aadeb6a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ COMPOSE:=sudo docker-compose +CANARY:=node_modules/.yarn-integrity .PHONY: all all: develop -%/node_modules/.yarn-integrity: - $(eval image:=$(patsubst %/node_modules/.yarn-integrity,%,$@)) +%/$(CANARY): + $(eval image:=$(patsubst %/$(CANARY),%,$@)) $(COMPOSE) build $(image) $(COMPOSE) run --rm $(image) yarn install --production=false @@ -12,19 +13,10 @@ DFILES:=$(wildcard */Dockerfile) IMAGES:=$(patsubst %/Dockerfile,%,$(DFILES)) .PHONY: develop -develop: $(patsubst %,%/node_modules/.yarn-integrity,$(IMAGES)) +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 - -.PHONY: fe-init fe-init-simple -fe-init: - $(COMPOSE) build frontend - $(COMPOSE) run --rm frontend vue init bootstrap-vue/webpack . - -fe-init-simple: - $(COMPOSE) build frontend - $(COMPOSE) run --rm frontend vue init bootstrap-vue/webpack-simple . diff --git a/docker-compose.yml b/docker-compose.yml index 548912c..32ad32e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,4 +9,4 @@ services: build: context: ./backend ports: - - "3001:3000" + - "3001:3001"