-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
39 lines (28 loc) · 874 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
# Variables
DOCKER_COMPOSE = docker compose
DOCKER_COMPOSE_FILE = docker-compose.yml
# Targets
.PHONY: up down build clean
all: build up
up:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d
@echo "All services are up and running"
down:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) down
@echo "All services are down"
build:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) build
@echo "All services are built"
clean:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) down --volumes --remove-orphans
@echo "All services, volumes and orphans are removed"
# Additional targets
.PHONY: backend frontend db cache
backend:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d backend
frontend:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d frontend
db:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d db
cache:
$(DOCKER_COMPOSE) -f $(DOCKER_COMPOSE_FILE) up -d cache