forked from ezsetup/ezsetup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
33 lines (24 loc) · 930 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
30
31
32
33
-include .env
export
.PHONY : install install-production run-api run-worker run-frontend test db-shell db-dump
install:
cd api && pip install pipenv && pipenv --python 3.6 && pipenv install -d
cd frontend && npm install
install-production:
cd api && pip install pipenv && pipenv --python 3.6 && pipenv install
cd frontend && npm install --production
run-api:
cd api && pipenv run python app.py
run-worker:
cd api && pipenv run rq worker -c backgroundjobs.settings
run-frontend:
cd frontend && npm run dev
test:
cd api && pipenv run mypy --ignore-missing-imports app.py
cd api && pipenv run mypy --ignore-missing-imports tests
cd api && PYTHONPATH=. pipenv run pytest
db-shell:
PGPASSWORD=${POSTGRES_PASSWORD} psql -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} -U ${POSTGRES_USER} -w
db-dump:
PGPASSWORD=${POSTGRES_PASSWORD} pg_dump -U ${POSTGRES_USER} -h ${POSTGRES_HOST} -p ${POSTGRES_PORT} \
-d ${POSTGRES_USER}