-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
73 lines (61 loc) · 2.52 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
ifeq (,$(wildcard .env))
@echo ".env file not found. Copying env.template to .env..."
@cp env.template .env
-@copy env.template .env
endif
include .env
install: # Only works on Debian based systems
@echo "Building backend..."
-@apt-get install -y python-is-python3
-@cp .env src/backend/.env
cd src/backend && python -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt
@echo "Building client..."
-@cp .env src/client/.env
cd src/client && npm i -g @quasar/cli@latest && npm i && quasar build -m pwa
@echo "Success! Run 'make backend' to start the backend server and 'make client' to start the client server."
@echo "Run 'make client-android' to start the client server with android studios."
@echo Finished Reading? CTRL+C to exit.
backend: # Only works on Debian based systems
@echo "Starting backend development server..."
-@cp .env src/backend/.env
-@cd src/backend && . .venv/bin/activate && uvicorn main:app --host 0.0.0.0 --port ${FVB_BACKEND_PORT} --reload
client: # Only works on Debian based systems
@echo "Starting client development server..."
-@cp .env src/client/.env
cd src/client && npm i -g @quasar/cli@latest && npm i && quasar dev -m spa -p 8080
client-android: # Only works on Debian based systems
@echo "Starting client development server with android studios..."
-@cp .env src/client/.env
cd src/client && npm i -g @quasar/cli@latest && npm i && quasar dev -m capacitor -T android --env.FVB_BACKEND_BASEURL ${FVB_BACKEND_BASEURL} --env.FVB_BACKEND_PORT ${FVB_BACKEND_PORT}
docker:
@echo "Starting docker containers with build..."
-@docker-compose down
-@docker compose build
docker compose up -d
docker-dev:
@echo "Starting docker dev containers with build..."
-@docker-compose down
-@docker compose build --no-cache
docker compose up -d
docker-dev-db:
@echo "Starting docker dev containers with build..."
-@docker-compose stop db phpmyadmin
-@docker-compose rm db phpmyadmin -f
docker compose up -d db phpmyadmin
docker-dev-nginx:
@echo "Starting docker dev containers with build..."
-@docker-compose stop nginx
-@docker-compose rm nginx -f
docker compose up -d nginx
docker-dev-client:
@echo "Starting docker dev containers with build..."
-@docker compose stop client
-@docker compose rm client -f
-@docker compose build client --no-cache
docker compose up -d client
docker-dev-backend:
@echo "Starting docker dev containers with build..."
-@docker-compose stop backend
-@docker-compose rm backend -f
-@docker compose build backend --no-cache
docker compose up -d backend