-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (30 loc) · 807 Bytes
/
Copy pathMakefile
File metadata and controls
40 lines (30 loc) · 807 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
33
34
35
36
37
38
39
40
# Variables
DOCKER_COMPOSE=docker compose
BUILDX=docker buildx
# Nom du builder ARM64
BUILDER_NAME=tinybot-builder
# Tâches principales
.PHONY: all build up down restart logs clean
all: build up
# Crée le builder buildx si absent
builder:
$(BUILDX) inspect $(BUILDER_NAME) > /dev/null 2>&1 || \
$(BUILDX) create --name $(BUILDER_NAME) --use
# Build des deux images localement (ARM64)
build: builder
$(DOCKER_COMPOSE) build
# Lance les conteneurs
up:
$(DOCKER_COMPOSE) up -d
# Arrête les conteneurs
down:
$(DOCKER_COMPOSE) down
# Redémarre tout proprement
restart: down up
# Affiche les logs
logs:
$(DOCKER_COMPOSE) logs -f --tail=50
# Supprime tous les conteneurs/images/volumes générés
clean:
$(DOCKER_COMPOSE) down --volumes --remove-orphans
$(BUILDX) rm $(BUILDER_NAME) || true