Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
89 lines (74 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
89 lines (74 loc) · 1.89 KB
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.ONESHELL:
.PHONY: lint
lint:
flake8
.ONESHELL:
.PHONY: format
format:
autoflake8 **/*.py -i
brunette **/*.py
.ONESHELL:
.PHONY: test
test: install lint
make start-deps
.ONESHELL:
.PHONY: test
test-ci: install lint make-buckets
echo "Running for tests for $(path)"
pytest $(path)
.ONESHELL:
.PHONY: test-js
test-js:
cd ./react-components
npm run lint
npm run test
.ONESHELL:
.PHONY: system_install
apt update && apt install -y nvidia-cuda-toolkit ffmpeg
nvcc --version
# For librabbitmq
apt-get install -y --no-install-recommends autoconf automake pkg-config libtool
.ONESHELL:
.PHONY: install
install:
pip install pip wheel -U
pip install -r requirements-dev.txt -U
.ONESHELL:
count-video-files:
aws --endpoint-url=${AWS_S3_ENDPOINT_URL} s3api list-objects-v2 --bucket=${BUCKET_MEDIA}|grep "thumbnails/custom"|wc -l
.ONESHELL:
make-buckets:
aws --endpoint-url=${AWS_S3_ENDPOINT_URL} s3 mb s3://${BUCKET_STATIC} || true
aws --endpoint-url=${AWS_S3_ENDPOINT_URL} s3 mb s3://${BUCKET_MEDIA} || true
.ONESHELL:
start-deps-remote:
docker-compose up -d postgres rabbit localstack redis
.ONESHELL:
start-deps:
docker-compose up -d postgres rabbit localstack redis
aws --endpoint-url=${AWS_S3_ENDPOINT_URL} s3 mb s3://${BUCKET_STATIC} || true
aws --endpoint-url=${AWS_S3_ENDPOINT_URL} s3 mb s3://${BUCKET_MEDIA} || true
.ONESHELL:
start-deps-min:
docker-compose up -d postgres rabbit redis
.ONESHELL:
.PHONY: seed
seed: install make-buckets
python manage.py flush --noinput
python manage.py import_seed_data
.ONESHELL:
.PHONY: run
run:
docker-compose build app_local
docker-compose run --service-port app_local
.ONESHELL:
.PHONY: docker-seed
docker-seed:
docker-compose build app_local
docker-compose run --service-port app_local make reset
.ONESHELL:
.PHONY: docker-test
docker-test:
docker-compose rm -f
docker-compose build app_test
docker-compose run app_test make test-ci path=$(path)