-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
43 lines (35 loc) · 1.07 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
# Display a list of available Makefile targets
help:
@echo "Available targets:"
@echo " help Display this help message"
@echo " build Build Docker containers"
@echo " up Start Docker containers"
@echo " f-up Run the frontend"
@echo " down Stop and remove Docker containers"
@echo " logs View Docker container logs"
@echo " rebuild Stop, build, and start Docker containers"
# Build Docker containers
build:
docker compose build
# Start Docker containers
up:
docker compose up
# Run 'npm start' in the frontend container
f-up:
docker exec -it mern-overflow-clinic-web-1 /bin/bash -c "cd ../client;npm start"
# Stop and remove Docker containers
down:
docker compose down
# Run tests
test:
docker exec -it mern-overflow-web-1 /bin/bash -c "npm test"
# View Docker container logs
logs:
docker compose logs -f
# Rebuild Docker containers stop, build, and start
rebuild:
cd server &&npm install
cd client &&npm install --legacy-peer-deps
docker compose down
docker compose build
docker compose up