forked from shipyard/react-flask-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (35 loc) · 921 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
42
43
44
45
46
47
48
VOLUME=$(shell basename $(PWD))
develop: clean build migrations.upgrade run
clean:
docker-compose rm -vf
build:
docker-compose build
run:
docker-compose up
frontend-shell:
docker-compose run frontend \
sh
backend-shell:
docker-compose run worker \
sh
python-shell:
docker-compose run worker \
poetry run flask shell
postgres.data.delete: clean
docker volume rm $(VOLUME)_postgres
postgres.start:
docker-compose up -d postgres
docker-compose exec postgres \
sh -c 'while ! nc -z postgres 5432; do sleep 0.1; done'
migrations.blank: postgres.start
docker-compose run worker \
poetry run flask db revision
migrations.create: postgres.start
docker-compose run worker \
poetry run flask db migrate
migrations.upgrade: postgres.start
docker-compose run worker \
poetry run flask db upgrade
migrations.heads: postgres.start
docker-compose run worker \
poetry run flask db heads