forked from DeepInsight-AI/DeepBI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (21 loc) · 893 Bytes
/
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
.PHONY: compose_build up test_db create_database clean down tests lint backend-unit-tests frontend-unit-tests test build watch start redis-cli bash
compose_build:
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build
up:
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose up -d --build
test_db:
@for i in `seq 1 5`; do \
if (docker-compose exec postgres sh -c 'psql -U postgres -c "select 1;"' 2>&1 > /dev/null) then break; \
else echo "postgres initializing..."; sleep 5; fi \
done
docker-compose exec postgres sh -c 'psql -U postgres -c "drop database if exists tests;" && psql -U postgres -c "create database tests;"'
create_database:
docker-compose run server create_db
clean:
docker-compose down && docker-compose rm
down:
docker-compose down
redis-cli:
docker-compose run --rm redis redis-cli -h redis
bash:
docker-compose run --rm server bash