-
Notifications
You must be signed in to change notification settings - Fork 59
/
Makefile
47 lines (35 loc) · 881 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
release:
poetry publish --build
format:
black .
isort .
doc-deploy:
mkdocs gh-deploy
doc-run:
mkdocs serve
# Define variables
IMAGE_NAME = parsera
CONTAINER_NAME = parsera
DOCKER_COMPOSE_FILE = docker-compose.yaml
# Targets
.PHONY: build up down restart logs shell
# Build Docker image
build:
docker build -t $(IMAGE_NAME) .
# Start containers using Docker Compose
up:
docker-compose -f $(DOCKER_COMPOSE_FILE) up --build -d
# Stop and remove containers using Docker Compose
down:
docker-compose -f $(DOCKER_COMPOSE_FILE) down
# Restart containers using Docker Compose
restart: down up
# View logs of the containers
logs:
docker-compose -f $(DOCKER_COMPOSE_FILE) logs -f
# Open a shell in the running container
shell:
docker exec -it $(CONTAINER_NAME) /bin/sh
# Remove all stopped containers, unused networks, and dangling images
clean:
docker system prune -f