-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakefile
More file actions
32 lines (24 loc) · 668 Bytes
/
Copy pathmakefile
File metadata and controls
32 lines (24 loc) · 668 Bytes
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
# Variables
COMPOSE_FILE=docker-compose.yml
CONTAINER_NAME=fastapi-container
# Build the Docker images
build:
docker-compose -f $(COMPOSE_FILE) build
# Start the services
up:
docker-compose -f $(COMPOSE_FILE) up -d
# Stop the services
down:
docker-compose -f $(COMPOSE_FILE) down
# Restart the services
restart: down up
# Show the status of the services
status:
docker-compose -f $(COMPOSE_FILE) ps
# Tail logs of the services
logs:
docker-compose -f $(COMPOSE_FILE) logs -f
# Run the tests
test:
docker exec -i ${CONTAINER_NAME} sh -c "cd /app/app && pip install --upgrade httpx starlette && ls && pytest"
.PHONY: build up down restart status logs test