-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
48 lines (33 loc) · 1.75 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
#!/usr/bin/env make
.PHONY: start dev build clean docker-build docker-console build-console
default: dev
# ---------------------------------------------------------------------------------------------------------------------
# CONFIG
# ---------------------------------------------------------------------------------------------------------------------
DOCKER_IMAGE_VERSION=0.2.0
DOCKER_IMAGE_TAG=leovs09/mind-history-extension:$(DOCKER_IMAGE_VERSION)
# ---------------------------------------------------------------------------------------------------------------------
# UTILS
# ---------------------------------------------------------------------------------------------------------------------
clean:
rm -rf dist
# ---------------------------------------------------------------------------------------------------------------------
# DEVELOPMENT
# ---------------------------------------------------------------------------------------------------------------------
dev: docker-build docker-start
production:
npm run build
# ---------------------------------------------------------------------------------------------------------------------
# DOCKER
# ---------------------------------------------------------------------------------------------------------------------
# Will build docker image for development
docker-build:
docker build --tag $(DOCKER_IMAGE_TAG) .
# Will start in docker develoment environment
docker-console:
docker run -it --rm -v ${PWD}:/work -w /work --name mind-history-extension -p 3000:3000 $(DOCKER_IMAGE_TAG) bash
console: docker-console
docker-start:
docker run -it --rm -v ${PWD}:/work -w /work --name mind-history-extension -p 3000:3000 $(DOCKER_IMAGE_TAG) yarn start
attach-console:
docker exec -it mind-history-extension /bin/bash