-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
78 lines (53 loc) · 1.71 KB
/
makefile
File metadata and controls
78 lines (53 loc) · 1.71 KB
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
# Caminhos
FRONTEND_DIR=./frontend
BACKEND_DIR=./backend
MOBILE_DIR=./mobile
DOCKER_COMPOSE=docker compose
# --------- NODE + REACT COMMANDS ---------- #
install:
cd $(FRONTEND_DIR) && npm install
cd $(BACKEND_DIR) && npm install
cd $(MOBILE_DIR) && npm install
build:
cd $(FRONTEND_DIR) && npm run build
dev:
gnome-terminal -- bash -c "cd $(BACKEND_DIR) && node server/app.js; exec bash"
cd $(FRONTEND_DIR) && npm start
lint:
cd $(FRONTEND_DIR) && npm run lint || true
cd $(BACKEND_DIR) && npm run lint || true
cd $(MOBILE_DIR) && npm run lint || true
test:
cd $(FRONTEND_DIR) && npm test || true
cd $(BACKEND_DIR) && npm test || true
cd $(MOBILE_DIR) && npm test || true
clean:
rm -rf $(FRONTEND_DIR)/node_modules $(BACKEND_DIR)/node_modules $(MOBILE_DIR)/node_modules
restart-backend:
pkill -f "node server/app.js" || true
cd $(BACKEND_DIR) && node server/app.js &
# --------- DOCKER COMMANDS ---------- #
docker-build:
$(DOCKER_COMPOSE) build
docker-up:
$(DOCKER_COMPOSE) up --build
docker-down:
$(DOCKER_COMPOSE) down -v
docker-logs:
$(DOCKER_COMPOSE) logs -f
docker-restart-backend:
$(DOCKER_COMPOSE) restart backend
# --------- GIT COMMANDS ---------- #
push-https:
git remote set-url origin https://github.com/Pedroxbr16/clinica-node.git
git add .
git commit -m "Atualizações via Makefile" || echo "Nada para commitar"
git push origin main
push-ssh:
git remote set-url origin git@github.com:Pedroxbr16/clinica-node.git
git add .
git commit -m "Atualizações via Makefile" || echo "Nada para commitar"
git push origin main
# --------- MOBILE DEV ---------- #
mobile:
cd $(MOBILE_DIR) && npx expo start --tunnel