-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
52 lines (39 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
52
d_network=ladesa-net
d_container_app=ladesa-api
compose_options=--file .devops/development/docker-compose.yml -p ladesa-api
setup:
$(shell (cd .devops/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;
# --force-recreate
docker compose $(compose_options) up --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;