-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
52 lines (36 loc) · 1.58 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
docker_file ?= -f docker-compose.yml -f docker-compose.local.yml
execute_flags ?=
makemigrations:
docker compose $(docker_file) exec $(execute_flags) web python manage.py makemigrations
migrate:
docker compose $(docker_file) exec $(execute_flags) web python manage.py migrate
createsuperuser:
docker compose $(docker_file) exec $(execute_flags) web python manage.py createsuperuser
collectstatic:
docker compose $(docker_file) exec $(execute_flags) web python manage.py collectstatic
shell:
docker compose $(docker_file) exec $(execute_flags) web python manage.py shell
install:
docker compose $(docker_file) exec $(execute_flags) web pip install $(package)
bash:
docker compose $(docker_file) exec $(execute_flags) web bash
start:
docker compose $(docker_file) build
docker compose $(docker_file) up --no-start --remove-orphans
docker compose $(docker_file) start
stop:
docker compose $(docker_file) down
restart: stop start
dropdb:
docker compose $(docker_file) down
- docker volume rm image_processing_postgres_data
setup_initial_data:
docker compose $(docker_file) run $(execute_flags) web python manage.py process_excel_images data/img.csv
redo-db: dropdb start migrate setup_initial_data
prune:
docker system prune --force
pre-commit:
pre-commit run --all-files
test:
docker compose $(docker_file) run $(execute_flags) web python manage.py test --settings image_processing.settings.development --keepdb --no-input --failfast
docker compose $(docker_file) run $(execute_flags) web python manage.py test --settings image_processing.settings.development --keepdb --no-input --failfast