1
0
mirror of https://github.com/alice-lg/alice-lg.git synced 2024-05-11 05:55:03 +00:00
alice-lg-alice-lg/client/Makefile.docker
2018-07-18 11:00:37 +02:00

36 lines
739 B
Docker

DOCKER_CONTAINER := alice-lg-node-build
DOCKER_IMAGE := alice-lg-node:latest
DOCKER_EXEC := docker run -t -i \
-a stdin -a stdout -a stderr \
-v `pwd`:/client/ \
--name $(DOCKER_CONTAINER) \
$(DOCKER_IMAGE) /bin/bash -c
all: client
@echo "Built alice-lg client"
image:
docker build . -t $(DOCKER_IMAGE)
deps: image
$(DOCKER_EXEC) "npm install"
client: deps
@echo "Building alice UI"
$(DOCKER_EXEC) "./node_modules/.bin/gulp"
client_prod: deps
@echo "Building alice UI (production)"
$(DOCKER_EXEC) "DISABLE_LOGGING=1 NODE_ENV=production ./node_modules/.bin/gulp"
watch:
$(DOCKER_EXEC) "while true; do ./node_modules/.bin/gulp watch; done"
stop:
docker stop $(DOCKER_CONTAINER)
kill:
docker kill $(DOCKER_CONTAINER)