-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (41 loc) · 986 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
49
50
51
52
# 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
sudo docker-compose up -d
sudo docker exec -it restaurant-service python manage.py makemigrations
sudo docker exec -it restaurant-service python manage.py migrate
sudo docker-compose logs -f
test:
# run unit tests
docker-compose run api python manage.py test