-
Notifications
You must be signed in to change notification settings - Fork 3
/
dev
executable file
·50 lines (50 loc) · 1.43 KB
/
dev
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
#!/bin/bash
while [ "$1" != "" ]
do
case "$1" in
backend)
mkdir -p ./tmp/{db,pyenv,data}
docker-compose -f docker/docker-compose.dev.yml run -p 8000:8000 backend bash
;;
frontend)
docker-compose -f docker/docker-compose.dev.yml run -p 9000:9000 frontend bash
;;
start)
yarn install
yarn start
;;
run)
pipenv run python3 manage.py migrate
pipenv run python3 manage.py runserver 0.0.0.0:8000
;;
mkmsg)
pipenv run python3 manage.py makemessages -l en
;;
comsg)
pipenv run python3 manage.py compilemessages -l en
;;
makemigrations)
pipenv run python3 manage.py makemigrations
;;
migrate)
pipenv run python3 manage.py migrate
;;
test)
pipenv run python3 manage.py test
;;
coverage)
pipenv run coverage run --source='.' manage.py test
pipenv run coverage report
;;
down)
docker-compose -f docker/docker-compose.dev.yml down
;;
docker-restart)
docker start $(docker ps -a -q -f status=exited)
;;
-h | --help)
echo $"Usage: $0 {backend|frontend|down|run|start|docker-restart}"
exit 1
esac
shift
done