forked from tko22/flask-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (29 loc) · 803 Bytes
/
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
mac_setup:
./mac_setup
setup: start_dev_db
pip3 install virtualenv
virtualenv venv
venv/bin/pip install -r requirements.txt -r requirements-dev.txt
venv/bin/python manage.py recreate_db
run_server:
venv/bin/python manage.py runserver
start_dev_db:
echo "creating docker postgres DB"
docker run -e POSTGRES_USER=testusr -e POSTGRES_PASSWORD=password -e POSTGRES_DB=testdb -p 5432:5432 -v flask-app-db:/var/lib/postgresql/data -d postgres:10
recreate_db:
./scripts/docker_destroy.sh
start_dev_db
sleep 2
venv/bin/python manage.py recreate_db
destroy:
./scripts/docker_destroy.sh
up:
docker-compose up
compose_destroy:
docker-compose stop
docker-compose rm -f
docker volume rm flask-app-db
make compose_start:
docker-compose start
heroku_setup:
python manage.py recreate_db