-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (61 loc) · 1.73 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
61
62
63
64
65
66
67
68
69
70
71
.DEFAULT_GOAL := hello
.PHONY: run
show-banner:
@echo "=================================================="
@echo " __ _____ ____ __ ___ _ __ ___ _ __"
@echo " / / / _/ |/ / //_/ / _ ( ) / / / _ | | /| / /"
@echo " / /___/ // / ,< / // // / /__/ __ | |/ |/ / "
@echo "/____/___/_/|_/_/|_| /____/ /____/_/ |_|__/|__/ "
@echo ""
@echo "=================================================="
hello:
@make show-banner
@echo "Hello Guys!!!"
setup-dev:
@make show-banner
@echo "[SETUP DEV] setup-dev"
@echo "[SETUP DEV] Setup environment ..."
@cp .env.development .env
@echo "[SETUP DEV] Setup environment ... DONE"
@echo "[SETUP DEV] Setup docker ..."
@docker-compose up -d --build
@echo "[SETUP DEV] Setup docker ... DONE"
@echo "[SETUP DEV] ALL Services now running ... check in http://localhost:80"
dev-docker:
@make show-banner
@echo "Running Dev Docker ..."
@echo "Running Dev Docker - API Service"
@docker-compose up
dev-api:
@make show-banner
@echo "Running Dev ..."
@echo "Running Dev - API Service"
@bun dev
prod-api:
@make show-banner
@echo "Running Prod ..."
@echo "Running Prod - API Service"
@bun start
docker-build-images:
@make show-banner
@echo "Building Docker Images ..."
build:
@make show-banner
@echo "Building Prod ..."
@echo "Building Prod - API Service"
@bun run build:bin
build-docker-images-prod:
@make show-banner
@echo "Building Docker Images ..."
@echo "Building Docker Images - API Service"
@docker build -t linkdlaw:latest -f ./docker/production/Dockerfile .
run:
@make show-banner
@path=./bin/$(filter-out $@,$(MAKECMDGOALS)); \
if [ -f $$path ]; then \
echo "Running $$path"; \
$$path; \
else \
echo "Error: $$path does not exist or is not a file"; \
exit 1; \
fi