-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (37 loc) · 1.22 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
LOCAL=environments/local
status:
cd $(LOCAL); docker-compose ps
build:
cd $(LOCAL); docker-compose build
up:
cd $(LOCAL); docker-compose up
stop:
cd $(LOCAL); docker-compose stop
down:
cd $(LOCAL); docker-compose down
restart:
cd $(LOCAL); docker-compose down && docker-compose up -d
shell-web:
cd $(LOCAL); docker-compose exec web bash
shell-db:
cd $(LOCAL); docker-compose exec db bash
log-web:
cd $(LOCAL); docker-compose logs web
log-db:
cd $(LOCAL); docker-compose logs db
logs:
cd $(LOCAL); docker-compose logs -f
collectstatic:
cd $(LOCAL); docker-compose exec -T web /bin/sh -c "python manage.py collectstatic --noinput"
migrate:
cd $(LOCAL); docker-compose exec -T web /bin/sh -c "python manage.py migrate"
migrations:
cd $(LOCAL); docker-compose exec -T web /bin/sh -c "python manage.py makemigrations"
test:
cd $(LOCAL); docker-compose exec -T web /bin/sh -c "python manage.py test"
TEST_DATE=`date +'%y_%m_%d_%H-%M-%S'`
pytest:
cd $(LOCAL); docker-compose exec -T web /bin/sh -c "python -m pytest --junitxml=./test-reports/pytest_$(TEST_DATE).xml"
touch:
cd $(LOCAL); docker-compose exec -T web /bin/sh -c "touch /app/touch-wsgi-reload"
deploy: build backup-predeploy restart migrate collectstatic touch