-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
76 lines (52 loc) · 1.96 KB
/
Copy pathMakefile
File metadata and controls
76 lines (52 loc) · 1.96 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
rootdir = $(realpath .)
all: build up create_user_db yarn_build collectstatic create_cache_table migrate_db import_data
all_no_cache: build_no_cache up yarn_build collectstatic create_user_db create_cache_table migrate_db import_data
init:
pip install -r requirements.txt
create_user_db:
docker exec --user postgres pokepare_db /bin/sh -c "psql -tc \"SELECT 1 FROM pg_user WHERE usename = 'pokepare'\" | grep -q 1 || (createuser pokepare -s && createdb -U pokepare pokepare)"
create_cache_table:
docker exec pokepare_py /bin/sh -c "python manage.py createcachetable"
migrate_db:
docker exec pokepare_py /bin/sh -c 'python manage.py makemigrations'
docker exec pokepare_py /bin/sh -c 'python manage.py migrate'
flush_db:
docker exec pokepare_py /bin/sh -c 'python manage.py flush --no-input'
import_data:
docker exec pokepare_py /bin/sh -c 'python manage.py import_data all'
import_pokemons:
docker exec pokepare_py /bin/sh -c 'python manage.py import_data pokemons'
import_languages:
docker exec pokepare_py /bin/sh -c 'python manage.py import_data languages'
import_cards:
docker exec pokepare_py /bin/sh -c 'python manage.py import_data cards'
import_cardsets:
docker exec pokepare_py /bin/sh -c 'python manage.py import_data cardsets'
add_images:
docker exec pokepare_py /bin/sh -c 'python manage.py add_images all /usr/src/app/public/media/cards/'
cov_test:
docker exec pokepare_py /bin/sh -c 'coverage run manage.py test'
cov_report:
docker exec pokepare_py /bin/sh -c 'coverage report'
build:
docker-compose build
build_no_cache:
docker-compose build --no-cache
up:
docker-compose up -d
up_no_d:
docker-compose up
restart:
docker-compose restart
collectstatic:
docker exec pokepare_py /bin/sh -c "python manage.py collectstatic --noinput"
bash_nginx:
docker exec -ti pokepare_nginx bash
bash_web:
docker exec -ti pokepare_py bash
bash_db:
docker exec -ti pokepare_db bash
yarn_build:
cd frontend && yarn build && cd ..
freeze:
pip freeze > requirements.txt