-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
43 lines (39 loc) · 1.46 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
.PHONY: help
dev:
@echo "[i] Project is starting in development mode...\n"
@if command -v docker-compose > /dev/null; then \
echo "[i] Using docker-compose..."; \
docker-compose -f docker/dev.docker-compose.yaml -p codinlab up -d; \
else \
echo "[i] Using docker compose..."; \
docker compose -f docker/dev.docker-compose.yaml -p codinlab up -d; \
fi
@echo "\n[+] Project is started in development mode..."
down:
@echo "[i] Stopping and removing containers...\n"
@if command -v docker-compose > /dev/null; then \
echo "[i] Using docker-compose..."; \
docker-compose -f docker/dev.docker-compose.yaml -p codinlab down; \
else \
echo "[i] Using docker compose..."; \
docker compose -f docker/dev.docker-compose.yaml -p codinlab down; \
fi
@echo "\n[+] Project is stopped and containers are removed..."
dev-build:
@echo "[i] Production mode is not active for now.\n"
@if command -v docker-compose > /dev/null; then \
echo "[i] Using docker-compose..."; \
docker-compose -f docker/dev.docker-compose.yaml -p codinlab build; \
else \
echo "[i] Using docker compose..."; \
docker compose -f docker/dev.docker-compose.yaml -p codinlab build; \
fi
help:
@echo "[i] Usage: make <target>"
@echo ""
@echo "Targets:"
@echo " dev start project in development mode"
@echo " down stop and remove containers"
@echo " build build project in production mode"
@echo " dev-build build project in development mode"
@echo " help Show this help"