forked from 42-MyMisters/transcendence
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (50 loc) · 1.67 KB
/
Copy pathMakefile
File metadata and controls
64 lines (50 loc) · 1.67 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
# **************************************************************************** #
# #
# ::: :::::::: #
# Makefile :+: :+: :+: #
# +:+ +:+ +:+ #
# By: seseo <seseo@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2023/01/25 16:48:49 by seseo #+# #+# #
# Updated: 2023/05/03 17:47:26 by seseo ### ########.fr #
# #
# **************************************************************************** #
# for docker compose
DC := docker-compose --env-file ./config/.env --env-file ./config/.postgres.env
DC_SRC := ./docker-compose.yml
DI := docker image
DIL := $(DI)s
DV := docker volume
DVL := $(DV) ls
DN := docker network
DNL := $(DN) ls
TARGET := transcendence
.PHONY: all
all: up
.PHONY: up
up:
git submodule init && git submodule update
mkdir -p ./db
cp ./config/development.yml ./backend/back/config/development.yml
$(DC) -f $(DC_SRC) -p $(TARGET) up --build -d
.PHONY: down
down:
$(DC) -f $(DC_SRC) -p $(TARGET) down
.PHONY: re
re: clean
make up
.PHONY: clean
clean:
$(DC) -f $(DC_SRC) -p $(TARGET) down -v
.PHONY: fclean
fclean:
$(DC) -f $(DC_SRC) -p $(TARGET) down -v --rmi all
.PHONY: img_ls
img_ls:
$(DIL)
.PHONY: vol_ls
vol_ls:
$(DVL)
.PHONY: net_ls
net_ls:
$(DNL)