-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (38 loc) · 1.08 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
d_network=ladesa-net
d_container_app=ladesa-ro-auth
compose_options=--file .development/docker-compose.yml -p ladesa-ro-auth
setup:
$(shell (cd .development; find . -type f -name "*.example" -exec sh -c 'cp -n {} $$(basename {} .example)' \;))
$(shell (bash -c "docker network create $(d_network) &>/dev/null"))
up:
make setup;
docker-compose $(compose_options) up --force-recreate --remove-orphans -d;
start:
make setup;
make down;
make up;
docker compose $(compose_options) exec \
-u node \
--no-TTY \
-d $(d_container_app) \
bash -c "npm i && npm run migration:run && npm run start:dev" \& \
;
logs:
make setup;
docker compose $(compose_options) logs -f;
shell:
make setup;
make up;
docker compose $(compose_options) exec $(d_container_app) bash;
shell-root:
make setup;
make up;
docker compose $(compose_options) exec -u root $(d_container_app) 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;