-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·47 lines (31 loc) · 1.26 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
SHELL := /bin/bash
.PHONY: hasura-console install run clean db-clean db-migrate db-dump prune update populate-backend django-bash test-web generate-gql web
all: run
install:
@pnpm i
build:
@docker-compose -f docker-compose.yaml --env-file .env.local build
build-no-cache:
@docker-compose -f docker-compose.yaml --env-file .env.local build --no-cache
run: install build
build-run-no-cache: build-no-cache
run-no-cache
prune:
@docker-compose -f docker-compose.yaml --env-file .env.local down
@docker-compose -f docker-compose.yaml --env-file .env.local rm -f
clean: prune
@pnpm run clean
db-clean:
@node ./tools/deleteAllData.js
seed-hasura:
@docker-compose exec -T hasura-console bash -c "cd /usr/src/hasura/app && hasura seeds apply --database-name=default"
reset-db-and-seeds: db-clean seed-hasura
db-clean-test:
@DB_PORT=5454 node ./tools/deleteAllData.js
reset-docker:
@docker-compose -f docker-compose.yaml down --volumes
@docker-compose -f ./tools/test/docker-compose.yml --env-file ./tools/test/.env.test.jest down --volumes
restart-hasura:
@docker-compose -f docker-compose.yaml --env-file .env.local restart hasura-engine
restart-hasura-test:
@docker-compose -f ./tools/test/docker-compose.yml --env-file ./tools/test/.env.test.jest restart hasura-engine