-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
164 lines (127 loc) · 4.19 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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
MAKEFLAGS += --silent --keep-going
DOCKER_COMPOSE_LOCAL = $(shell echo ".docker/docker-compose.local.yml")
DOCKER_COMPOSE_PROD = $(shell echo ".docker/docker-compose.prod.yml")
########################################################################################
#### Local Environment ####
########################################################################################
.PHONY: docker-build-local docker-run-local docker-run-attach-local docker-down-local
docker-build-local:
@docker-compose \
--file $(DOCKER_COMPOSE_LOCAL) \
--project-directory . \
--env-file .env.local \
build \
--no-cache
@echo "[INFO] Local instance was successfully built!"
docker-run-local:
@docker-compose \
--file $(DOCKER_COMPOSE_LOCAL) \
--project-directory . \
--env-file .env.local \
up \
--detach
@echo "[INFO] Local instance was successfully started!"
docker-run-attach-local:
@docker-compose \
--file $(DOCKER_COMPOSE_LOCAL) \
--project-directory . \
--env-file .env.local \
up
@echo "[INFO] Local instance was successfully started and attached!"
docker-down-local:
@docker-compose \
--file $(DOCKER_COMPOSE_LOCAL) \
--project-directory . \
--env-file .env.local \
down --remove-orphans
@echo "[INFO] Local instance was successfully downed."
########################################################################################
#### Production Environment ####
########################################################################################
.PHONY: docker-build-prod docker-run-prod docker-run-attach-prod docker-down-prod
docker-build-prod:
@docker-compose \
--file $(DOCKER_COMPOSE_PROD) \
--project-directory . \
--env-file .env.prod \
build \
--no-cache
@echo "[INFO] Production instance was successfully built!"
docker-run-prod:
@docker-compose \
--file $(DOCKER_COMPOSE_PROD) \
--project-directory . \
--env-file .env.prod \
up \
--detach
@echo "[INFO] Production instance was successfully started!"
docker-run-attach-prod:
@docker-compose \
--file $(DOCKER_COMPOSE_PROD) \
--project-directory . \
--env-file .env.prod \
up
@echo "[INFO] Production instance was successfully started and attached!"
docker-down-prod:
@docker-compose \
--file $(DOCKER_COMPOSE_PROD) \
--project-directory . \
--env-file .env.prod \
down --remove-orphans
@echo "[INFO] Production instance was successfully downed."
########################################################################################
#### BASE SCRIPTS ####
########################################################################################
.PHONY: tool-clean
tool-clean:
./tools/clean.sh
########################################################################################
#### NPM BASE SCRIPTS ####
########################################################################################
.PHONY: dev build start test lint clean
dev:
@pnpm run dev
build:
@pnpm run build
start:
@pnpm run start
test:
@pnpm run test
lint:
@pnpm run lint
clean:
@pnpm run clean
########################################################################################
#### NPM SCRIPTS ####
########################################################################################
.PHONY: dev-api dev-web dev-web-electron dev-nuxt dev-mobile build-api build-web build-web-electron build-nuxt build-mobile start-api start-web start-nuxt mobile-android mobile-ios
dev-api:
@pnpm run dev-api
dev-web:
@pnpm run dev-web
dev-web-electron:
@pnpm run dev-web-electron
dev-nuxt:
@pnpm run dev-nuxt
dev-mobile:
@pnpm run dev-mobile
build-api:
@pnpm run build-api
build-web:
@pnpm run build-web
build-web-electron:
@pnpm run build-web-electron
build-nuxt:
@pnpm run build-nuxt
build-mobile:
@pnpm run build-mobile
start-api:
@pnpm run start-api
start-web:
@pnpm run start-web
start-nuxt:
@pnpm run start-nuxt
mobile-android:
@pnpm run mobile-android
mobile-ios:
@pnpm run mobile-ios