-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (45 loc) · 1.04 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
# DOCKER DEPLOY ------------------------------------------------
file := "docker-compose.yml"
up:
# Create and start containers
docker-compose up -d db
sleep 10
docker-compose up -d api
docker-compose logs -f
build:
# Rebuild the docker compose
docker-compose build
restart:
# Restart services
docker-compose restart
logs:
# View output from containers
docker-compose logs
start:
# Start services
docker-compose start
stop:
# Stop services
docker-compose stop
ps:
# List all running containers
docker-compose ps
down:
# Stop and Remove all containers
docker-compose down
migrations:
# Create migrations
docker-compose run api python manage.py makemigrations
migrate:
# Migrate migrations
docker-compose run api python manage.py migrate
test:
# run unit tests
docker-compose run api bash -c "coverage run manage.py test && coverage report"
test-report:
# Create a covarege page based on the tests
sudo rm -rf htmlcov
docker-compose run api coverage html
shell:
# run python shell
docker-compose run api python manage.py shell