.PHONY: build-container dev prod info

IMGNAME = vue-frontend
CONNAME = vue_frontend

all: info

info:
	echo "Pick either dev or prod."

clean:
	- docker rm -f $(CONNAME)

build-container:
	docker build . -t $(IMGNAME)

dev:	build-container clean
	docker run --name $(CONNAME) -d -p 8080:8080 -v $(shell pwd):/src $(IMGNAME) /src/ops_scripts/dev.sh

prod: 	build-container clean
	docker run --name $(CONNAME) -d -p 8080:8080 -v $(shell pwd):/src $(IMGNAME) /src/ops_scripts/prod.sh

node-env: clean
	docker run --name $(CONNAME) -it -p 8080:8080 -v $(shell pwd):/src $(IMGNAME)
