-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·48 lines (37 loc) · 1.13 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
DOCKER = docker
COMPOSE = docker-compose
.PHONY: all build up down pause unpause clean fclean re
all :
./start.sh
cat .env
$(COMPOSE) up --build
#build or rebuild services
build:
$(COMPOSE) build
# Creates and start containers
up:
${COMPOSE} up
# Stops containers and removes containers, networks, volumes, and images created by up
down:
$(COMPOSE) down
# Pause containers
pause:
$(COMPOSE) pause
# Unpause containers
unpause:
$(COMPOSE) unpause
# down and make sure every containers are deleted
clean:
$(COMPOSE) down -v --rmi all --remove-orphans
rm -rf ./database-data && echo "removed database"
rm -rf ./frontend/typescript-react-app/node_modules && echo "removed node_modules"
rm -rf ./frontend/typescript-react-app/package-lock.json
rm -rf ./backend/backend/node_modules && echo "removed node_modules"
# cleans and makes sure every volumes, networks and image are deleted
fclean: clean
$(DOCKER) system prune --volumes --all --force
$(DOCKER) network prune --force
echo docker volume rm $(docker volume ls -q)
$(DOCKER) image prune --force
# $(DOCKER) volume prune --force
re: fclean all