forked from cosmic-byte/flask-restplus-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
66 lines (47 loc) · 1.63 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
61
62
63
64
65
clean:
find . -type f -name '*.pyc' -delete
find . -type f -name '*.log' -delete
db_init:
.venv/bin/flask db init
db_migrate:
cd user && ../.venv/bin/flask db migrate --message 'initial database migration'
db_upgrade:
cd user && ../.venv/bin/flask db upgrade
celery-worker-up:
watchmedo auto-restart --directory . --pattern '*.py' --recursive -- celery worker -A main.worker.tasks
up-production:
docker-compose -f docker-compose.yml -f docker-compose.production.yml up -d
up-staging:
docker-compose -f docker-compose.yml -f docker-compose.staging.yml up -d
pgbouncer-chown:
sudo chown -R postgres:postgres pgbouncer/log
# ------------------------------ development --------------------------------
dev-build:
docker-compose -f docker-compose.yml -f docker-compose.development.yml build
dev-up:
docker-compose -f docker-compose.yml -f docker-compose.development.yml up -d
dev-down:
docker-compose -f docker-compose.yml -f docker-compose.development.yml down
dev-ps:
docker-compose -f docker-compose.yml -f docker-compose.development.yml ps
dev-db-upgrade:
docker exec flask-restplus-boilerplate-user-1 flask db upgrade
# ------------------------------ swarm --------------------------------
swarm-deploy:
docker stack deploy \
-f docker-compose.yml \
-f docker-compose.development.yml \
-f docker-compose.swarm.yml
stack_demo_name
TEST_MODULE := tests/controller/test_auth.py
local-test:
reset && \
docker exec flask-restplus-boilerplate-user-1 pytest \
-vv -s \
${TEST_MODULE} \
| grcat pytest.conf
local-test-all:
reset && \
docker exec flask-restplus-boilerplate-user-1 pytest \
-vv -s \
| grcat pytest.conf