38 lines
773 B
Makefile
38 lines
773 B
Makefile
.PHONY: build-all frontend-build sync-web backend-build run-all up down run-local run-backend run-frontend clean
|
|
|
|
build-all: frontend-build sync-web backend-build
|
|
|
|
frontend-build:
|
|
cd frontend && bun install --frozen-lockfile
|
|
cd frontend && bun run build
|
|
|
|
sync-web:
|
|
rm -rf backend/web/dist
|
|
mkdir -p backend/web
|
|
cp -R frontend/dist backend/web/dist
|
|
|
|
backend-build:
|
|
mkdir -p dist
|
|
cd backend && go build -o ../dist/driveflow-allinone .
|
|
|
|
run-all:
|
|
docker compose up --build
|
|
|
|
up:
|
|
docker compose up -d --build
|
|
|
|
down:
|
|
docker compose down
|
|
|
|
run-local: build-all
|
|
bunx concurrently -n api,web "./dist/driveflow-allinone" "bun --cwd frontend dev"
|
|
|
|
run-backend:
|
|
cd backend && go run .
|
|
|
|
run-frontend:
|
|
bun --cwd frontend dev
|
|
|
|
clean:
|
|
rm -rf dist backend/web/dist frontend/dist
|