-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
105 lines (89 loc) · 2.51 KB
/
Copy pathTaskfile.yaml
File metadata and controls
105 lines (89 loc) · 2.51 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
version: "3"
vars:
PYTHON: ".venv/bin/python"
SERVER_DIR: "apps/server"
WEB_CLIENT_DIR: "apps/web"
DOCKER_COMPOSE_FILEPATH: "./infra/compose/docker-compose.yaml"
tasks:
server:build:
desc: "Setup FastAPI server environment"
dir: "{{.SERVER_DIR}}"
cmds:
- python -m venv .venv
- .venv/bin/pip install -U pip
- .venv/bin/pip install -r requirements.txt
- .venv/bin/pip install -e .
server:dev:
desc: "Run FastAPI backend in development mode"
dir: "{{.SERVER_DIR}}"
cmds:
- "{{.PYTHON}} -X dev ./src/server/main.py"
server:start:
desc: "Run FastAPI backend normally"
dir: "{{.SERVER_DIR}}"
cmds:
- "{{.PYTHON}} ./src/server/main.py"
deps: [server:build]
server:clean:
desc: "Clean Python caches for backend"
dir: "{{.SERVER_DIR}}"
cmds:
- find . -type d -name "__pycache__" -exec rm -rf {} +
- rm -rf dist build *.egg-info
web:setup:
desc: "Install web client dependencies"
dir: "{{.WEB_CLIENT_DIR}}"
cmds:
- npm install
web:build:
desc: "Build Next.js frontend"
dir: "{{.WEB_CLIENT_DIR}}"
cmds:
- bun run build
web:dev:
desc: "Run Next.js frontend in dev mode"
dir: "{{.WEB_CLIENT_DIR}}"
cmds:
- bun run dev
web:start:
desc: "Start Next.js frontend"
dir: "{{.WEB_CLIENT_DIR}}"
cmds:
- bun run start
deps: [web:build]
dev:
desc: "Run both backend and frontend"
deps: [server:dev, web:dev]
start:
desc: "Start full stack (backend + frontend)"
deps: [server:start, web:start]
infra:up:
cmds:
- docker-compose -f "{{.DOCKER_COMPOSE_FILEPATH}}" up -d
- echo "Infra is up"
silent: true
infra:down:
cmds:
- docker-compose -f "{{.DOCKER_COMPOSE_FILEPATH}}" down
- echo "Infra is down"
silent: true
# windows-specific tasks
server:build:windows:
desc: "Setup FastAPI server environment (Windows)"
dir: "{{.SERVER_DIR}}"
cmds:
- python -m venv .venv
- .venv\Scripts\pip.exe install -U pip
- .venv\Scripts\pip.exe install -r requirements.txt
- .venv\Scripts\pip.exe install -e .
server:dev:windows:
desc: "Run FastAPI backend in development mode (Windows)"
dir: "{{.SERVER_DIR}}"
cmds:
- ".venv\\Scripts\\python.exe -X dev ./src/server/main.py"
server:start:windows:
desc: "Run FastAPI backend normally (Windows)"
dir: "{{.SERVER_DIR}}"
cmds:
- ".venv\\Scripts\\python.exe ./src/server/main.py"
deps: [server:build:windows]