-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
143 lines (96 loc) · 2.66 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
.DEFAULT_GOAL := help
.PHONY: docker-build docker-up build start log stop restart
PWD_PATH := $(shell pwd)
DOCKER_COMPOSE=docker-compose -f docker-compose.yaml
DOCKER_COMPOSE_PROD=docker-compose -f docker-compose-prod.yaml
DOCKER_COMPOSE_DEV=docker-compose -f docker-compose-dev.yaml
SEMAPPS_PATH=./../semapps
# Docker
docker-build:
$(DOCKER_COMPOSE) build
docker-build-prod:
$(DOCKER_COMPOSE_PROD) build
docker-build-dev:
$(DOCKER_COMPOSE_DEV) build
docker-stop:
$(DOCKER_COMPOSE) down
docker-stop-prod:
$(DOCKER_COMPOSE_PROD) down
docker-stop-dev:
$(DOCKER_COMPOSE_DEV) down
docker-start:
$(DOCKER_COMPOSE) up -d --force-recreate
docker-start-prod:
$(DOCKER_COMPOSE_PROD) up -d --force-recreate
docker-start-dev:
$(DOCKER_COMPOSE_DEV) up -d --force-recreate
log:
$(DOCKER_COMPOSE) logs -f middleware frontend
log-prod:
$(DOCKER_COMPOSE_PROD) logs -f middleware frontend traefik
log-dev:
$(DOCKER_COMPOSE_PROD) logs -f middleware frontend
start: docker-start
start-prod: docker-start-prod
start-dev: docker-start-dev
stop: docker-stop
stop-prod: docker-stop-prod
stop-dev: docker-stop-dev
make-init :
cp MakefileClient ./client/Makefile
cp MakefileServer ./server/Makefile
docker-init :
cp DockerfileClient.dev ./client/Dockerfile.dev
cp DockerfileClient.prod ./client/Dockerfile.prod
cp DockerfileServer ./server/Dockerfile
install :
cd ./client && make install
cd ./server && make install
server-init :
npm install -g moleculer-cli
moleculer init assemblee-virtuelle/semapps-template-ldp server --no-install --answers ./answers.json
cp MakefileServer ./server/Makefile
cp DockerfileServer ./server/Dockerfile
cd ./server && make install
client-init :
npx create-react-app client --template @semapps/dms-archipelago --no-install
cp MakefileClient ./client/Makefile
cp DockerfileClient.dev ./client/Dockerfile.dev
cp DockerfileClient.prod ./client/Dockerfile.prod
init :
make server-init
make client-init
build:docker-build
build-prod: docker-build-prod
build-dev: docker-build-dev
prettier:
npm run prettier --prefix ./client
npm run prettier --prefix ./server
link:
make client-link
make server-link
link-yarn:
make client-link-yarn
make server-link-yarn
client-link:
cd ./client && make link
server-link:
cd ./server && make link
client-link-yarn:
cd ./client && make link-yarn
server-link-yarn:
cd ./server && make link-yarn
unlink-yarn:
make client-unlink-yarn
make server-unlink-yarn
unlink:
make client-unlink
make server-unlink
client-unlink:
cd ./client && make unlink
server-unlink:
cd ./server && make unlink
client-unlink-yarn:
cd ./client && make unlink-yarn
server-unlink-yarn:
cd ./server && make unlink-yanr