-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
39 lines (31 loc) · 1.12 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
all: prep
@docker compose -f ./srcs/docker-compose.yml up -d --build
down:
@docker compose -f ./srcs/docker-compose.yml down
re: prep
@docker compose -f srcs/docker-compose.yml up -d --build
clean:
@if [ -n "$$(docker ps -qa)" ]; then \
docker stop $$(docker ps -qa); \
docker rm $$(docker ps -qa); \
fi
@if [ -n "$$(docker images -qa)" ]; then \
docker rmi -f $$(docker images -qa); \
fi
@if [ -n "$$(docker volume ls -q)" ]; then \
docker volume rm $$(docker volume ls -q); \
fi
@docker network ls | tail -n +2 | awk '$$2 !~ /bridge|none|host/' | awk '{ print $$1 }' | xargs -r -I {} docker network rm {}
prep:
@if [ ! -d "./srcs/chroma" ]; then \
git -C ./srcs clone https://github.com/chroma-core/chroma.git chroma; \
fi
web:
@docker compose -f ./srcs/docker-compose.yml stop nginx solar-backend
@docker compose -f ./srcs/docker-compose.yml up -d --build
webl:
@docker compose -f ./srcs/docker-compose.yml stop nginx solar-backend
@docker compose -f ./srcs/docker-compose.yml up --build
webd:
@docker compose -f ./srcs/docker-compose.yml stop nginx solar-backend
.PHONY: all re down clean prep web webd webl