-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.ps1
More file actions
27 lines (23 loc) · 924 Bytes
/
Copy pathdev.ps1
File metadata and controls
27 lines (23 loc) · 924 Bytes
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
# Script to launch the development environment for the project.
# You can choose to run it in a local environment or using Docker containers.
# For docker, ensure that Docker is installed and running on your machine.
# Usage: .\dev.ps1
$root = $PSScriptRoot
$choice = Read-Host "Choose anenvironment : [L]ocal | [D]ocker"
if ($choice -match '^[Dd]') {
docker compose -f "$root\docker-compose.yml" down
docker compose -f "$root\docker-compose.yml" up --build
}
elseif ($choice -match '^[Ll]') {
Start-Process powershell -ArgumentList @(
'-NoExit', '-Command',
"cd '$root\backend'; .\venv\Scripts\Activate.ps1; pip install -r requirements.txt; uvicorn main:app --reload"
)
Start-Process powershell -ArgumentList @(
'-NoExit', '-Command',
"cd '$root\frontend'; npm install; npm run dev"
)
}
else {
Write-Host "Please choose a valid option: [L]ocal or [D]ocker"
}