forked from Ellana42/ft_transcendance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
61 lines (41 loc) · 1.03 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
.PHONY: all re up down start stop status logs prune clean fclean db blog flog nlog plog pop delete_db system_prune
include .env
export
all: up blog
re: down up blog
up: setup
docker-compose -f docker-compose.yml up -d --build
down:
docker-compose -f docker-compose.yml down
start:
docker-compose -f docker-compose.yml start
stop:
docker-compose -f docker-compose.yml stop
status:
docker-compose ps
logs:
docker-compose logs
setup:
mkdir -p ${DATA_PATH}
mkdir -p ${DATA_PATH}/database
clean: down
rm -f ./backend-app/user_data/*
rm -rf ${DATA_PATH}
db: clean delete_db all blog
delete_db:
docker volume rm ft_transcendance_database
system_prune:
docker system prune -f -a --volumes
fclean: clean system_prune delete_db
blog:
docker-compose logs --follow backend
flog:
docker-compose logs --follow frontend
nlog:
docker-compose logs --follow nginx
plog:
docker-compose logs --follow postgresql
pop:
python3 test/populate_database.py
db_connect:
pgcli -h ${NGINX_HOST} -p ${DB_PORT} -u ${POSTGRES_USER} -d ${POSTGRES_DB}