-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
44 lines (30 loc) · 861 Bytes
/
Makefile
File metadata and controls
44 lines (30 loc) · 861 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
41
42
DEV_COMPOSE_FILE=infra/docker-compose.yml
DEBUG_COMPOSE_FILE=infra/docker-compose.debug.yml
TEST_COMPOSE_FILE=infra/docker-compose.test.yml
CONTAINER_ID=$(shell docker ps --filter "name=taskforge-gateway" --format "{{.ID}}")
## Docker Compose commands
.PHONY: up-no-build
up-no-build:
docker compose -f $(DEV_COMPOSE_FILE) up -d
.PHONY: up-build
up-build:
docker compose -f $(DEV_COMPOSE_FILE) up --build -d
.PHONY: down
down:
docker compose -f ${DEV_COMPOSE_FILE} down
.PHONY: restart
restart:
$(MAKE) down
$(MAKE) up-build
# .PHONY: logs-gateway
# logs-gateway:
# $(MAKE) logs name=gateway
# .PHONY: exec
# exec:
# docker exec -it ${CONTAINER_ID} sh
.PHONY: exec
exec:
docker exec -it $$(docker ps --filter "name=$(name)" --format "{{.ID}}") sh
.PHONY: logs
logs:
docker logs -f $$(docker ps --filter "name=$(name)" --format "{{.ID}}")