-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (42 loc) · 1.7 KB
/
Copy pathMakefile
File metadata and controls
49 lines (42 loc) · 1.7 KB
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
.PHONY: start front back storybook docker-deps docker-deps-down
# Default target
all: start
# Start frontend and backend with combined logs (installs frontend dependencies)
start:
@mise install
@cd front && npm install
@echo "\n🚀 Starting frontend and backend..."
@echo "📱 Front: https://localhost"
@echo "🔧 API: https://localhost/api"
@echo "🔧 API Doc: https://localhost/api/swagger/index.html\n"
@(cd front && npm run start) & (cd back && go tool air); wait
# Start frontend only (installs frontend dependencies)
front:
@mise install
@cd front && npm install
@echo "\n📱 Starting frontend on https://localhost"
cd front && npm run start
# Start backend only with hot reload
back:
@mise install
@echo "\n🔧 Starting backend on https://localhost/api"
cd back && go tool air
# Start storybook (installs frontend dependencies)
storybook:
@mise install
@cd front && npm install
@echo "\n📒 Starting Storybook on http://localhost:3002"
@cd front && npm run start:storybook
# Start dockerized dependencies (host mode)
docker-deps:
@echo "\n🐳 Starting dockerized dependencies..."
@docker compose -f docker-compose.dev.yml -f docker-compose.traefik-host.yml up -d traefik postgres
@echo "✅ Traefik is starting on https://localhost (dashboard: http://localhost:9000)"
@echo "✅ Postgres is starting on localhost:5432"
@echo "📝 Make sure your frontend is running on http://localhost:3000"
@echo "📝 Make sure your backend is running on http://localhost:3001"
# Stop dockerized dependencies (host mode)
docker-deps-down:
@echo "\n🐳 Stopping dockerized dependencies..."
@docker compose -f docker-compose.dev.yml -f docker-compose.traefik-host.yml down
@echo "🛑 Dependencies stopped"