-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (36 loc) · 1.14 KB
/
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
48
49
.PHONY: create install serve sh dist ps exec down ls open-browser
name := skeleton-vuecli
pwd := $(shell pwd)
version := v0.0.1
ui_ip = $(shell docker-compose ps | grep -o '0.0.0.0:[0-9]*->8000/tcp' | sed 's/->8000\/tcp//g')
devserver_ip = $(shell docker-compose ps | grep -o '0.0.0.0:[0-9]*->8080/tcp' | sed 's/->8080\/tcp//g')
# don't change the project name
create:
@docker build . -t ${name}:env -f docker/Dockerfile
@docker run --rm -it \
-v ${pwd}/frontend:/opt/webapp \
${name}:env \
vue create app --preset neos
install:
@docker build . -t ${name}:env -f docker/Dockerfile
@docker run --rm -it -v ${pwd}/frontend/app:/opt/webapp/app ${name}:env yarn install
ls:
@docker images ${name}
up:
@docker-compose up
ps:
@docker-compose ps
ui:
open -a 'Google Chrome' http://${ui_ip}
dev-server:
open -a 'Google Chrome' http://${devserver_ip}
exec:
@docker-compose exec workzone bash
sh:
@docker run --rm -it -v ${pwd}/frontend:/opt/webapp ${name}:env bash
open:
@echo "please open the web page for vue app"
deploy:
@docker build . -t ${name}:${version} -f docker/Dockerfile.dist
run-deploy:
@docker run --rm -d -p 80 ${name}:${version}