forked from kodless/leek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (36 loc) · 1.21 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
56
57
58
59
60
help:
@echo "server commands:"
@echo " make run_gunicorn: Runs flask app in gunicorn config"
@echo "docker-compose commands:"
@echo " make build: Build docker images"
@echo " make up: Run containers"
@echo " make upd: Run containers in the background"
@echo " make shell: Run shell in app's server"
@echo " make flask-shell: Run flask shell in application context"
@echo " make test: Run tests"
@echo " make down: Stops containers and removes containers created by up"
@echo " make routes: List flask routes"
build:
docker-compose build
upd:
docker-compose up -d
up:
docker-compose up
api:
docker-compose run --service-ports api
command:
docker-compose run --rm api python manage.py ${command}
shell:
docker-compose run --rm api bash
flask-shell:
docker-compose run --rm api python manage.py shell
test:
docker-compose run --rm api pytest -v
down:
docker-compose down
routes:
docker-compose run --rm api flask routes
prune:
docker stop $(docker ps -a -q); docker rm $(docker ps -a -q); docker system prune
run_gunicorn:
gunicorn --reload -c src/gunicorn.py "leek.runtime.server.wsgi:app"