forked from pinterest/querybook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
62 lines (44 loc) · 1.71 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
62
SHELL := /bin/bash
.PHONY: bundled_off prod_web prod_worker prod_scheduler docs remove_running_dev_image clean
bundled: dev_image
docker-compose up
bundled_off:
docker-compose down
web: dev_image remove_running_dev_image
docker-compose -f containers/docker-compose.dev.yml run web
worker: dev_image
docker-compose -f containers/docker-compose.dev.yml run worker
scheduler: dev_image
docker-compose -f containers/docker-compose.dev.yml run scheduler
terminal: dev_image
docker-compose -f containers/docker-compose.dev.yml run terminal
prod_web:
docker-compose -f containers/docker-compose.prod.yml run web
prod_worker:
docker-compose -f containers/docker-compose.prod.yml run worker
prod_scheduler:
docker-compose -f containers/docker-compose.prod.yml run scheduler
prod_image:
docker build --pull -t querybook .
dev_image:
docker build --pull -t querybook-dev . --build-arg PRODUCTION=false
docs:
docker-compose -f docs_website/docker-compose.yml --project-directory=. up --build
install: install_pip_runtime_dependencies install_yarn_packages
install_pip_runtime_dependencies:
pip install -r ./requirements.txt
install_yarn_packages: node_modules
node_modules: package.json
yarn install --ignore-scripts --frozen-lockfile --pure-lockfile --ignore-engines && npm rebuild node-sass
touch node_modules
remove_running_dev_image:
$(eval RUNNING_CONTAINERS=$(shell sh -c 'docker ps -q --filter name=querybook_devserver'))
docker kill $(RUNNING_CONTAINERS) || true
test: dev_image
docker-compose --file containers/docker-compose.test.yml up --abort-on-container-exit
clean: clean_pyc clean_docker
clean_pyc:
find . -name "*.pyc" -delete
find . -type d -name __pycache__ -delete
clean_docker:
docker system prune --volumes