-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (43 loc) · 1.36 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
MAKEFLAGS += --silent
d_network=ladesa-net
d_container_app=ladesa-ro-sso-development
compose_options=--file docker-compose.yml -p ladesa-ro-sso
setup:
$(shell (cd .; find . -type f -name "*.example" -exec sh -c 'cp -n {} $$(basename {} .example)' \;))
$(shell (bash -c "docker network create $(d_network) &>/dev/null"))
echo "baixando imagens base dos containers, isso pode levar alguns minutos..."
docker compose $(compose_options) build -q
prepare:
# docker compose $(compose_options) exec $(d_container_app) bash -c "corepack install && pnpm install";
up:
make setup;
docker compose $(compose_options) up --remove-orphans -d;
make prepare;
up-recreate:
make setup;
docker compose $(compose_options) up --remove-orphans -d --force-recreate;
make prepare;
start:
make setup;
make down;
make up;
logs:
make setup;
docker compose $(compose_options) logs -f;
INSIDE_PATH?=./
shell:
make setup;
make up;
docker compose $(compose_options) exec $(d_container_app) bash -c "cd $(INSIDE_PATH); clear; bash";
shell-root:
make setup;
make up;
docker compose $(compose_options) exec -u root $(d_container_app) bash -c "cd $(INSIDE_PATH); clear; bash";
stop:
make setup;
docker compose $(compose_options) stop;
down:
make setup;
docker compose $(compose_options) down --remove-orphans;
cleanup:
docker compose $(compose_options) down --remove-orphans -v;