30 lines
1.6 KiB
PowerShell
30 lines
1.6 KiB
PowerShell
Set-Location $PSScriptRoot
|
|
if (-not $env:DB_HOST) { $env:DB_HOST = 'localhost' }
|
|
if (-not $env:DB_PORT) { $env:DB_PORT = '5432' }
|
|
if (-not $env:DB_NAME) { $env:DB_NAME = 'trading_db' }
|
|
if (-not $env:DB_USER) { $env:DB_USER = 'trader' }
|
|
if (-not $env:DB_PASSWORD) { $env:DB_PASSWORD = 'traderpass' }
|
|
if (-not $env:DB_SCHEMA) { $env:DB_SCHEMA = 'quant_app' }
|
|
if (-not $env:DB_CONNECT_TIMEOUT) { $env:DB_CONNECT_TIMEOUT = '5' }
|
|
$frontendUrlFile = Join-Path (Split-Path -Parent $PSScriptRoot) 'ngrok_frontend_url.txt'
|
|
$env:ZERODHA_REDIRECT_URL = 'http://localhost:3000/login'
|
|
if (Test-Path $frontendUrlFile) {
|
|
$frontendUrl = (Get-Content $frontendUrlFile -Raw).Trim()
|
|
if ($frontendUrl) {
|
|
$env:CORS_ORIGINS = "http://localhost:3000,http://127.0.0.1:3000,$frontendUrl"
|
|
$env:COOKIE_SECURE = '1'
|
|
$env:COOKIE_SAMESITE = 'none'
|
|
$env:ZERODHA_REDIRECT_URL = "$frontendUrl/login"
|
|
}
|
|
}
|
|
if (-not $env:BROKER_TOKEN_KEY) { $env:BROKER_TOKEN_KEY = '6SuYLz0n7-KM5nB_Bs6ueYgDXZZvbmf-K-WpFbOMbH4=' }
|
|
if (-not $env:SUPER_ADMIN_EMAIL) { $env:SUPER_ADMIN_EMAIL = 'admin@example.com' }
|
|
if (-not $env:SUPER_ADMIN_PASSWORD) { $env:SUPER_ADMIN_PASSWORD = 'AdminPass123!' }
|
|
if (-not $env:SMTP_HOST) { $env:SMTP_HOST = 'smtp.gmail.com' }
|
|
if (-not $env:SMTP_PORT) { $env:SMTP_PORT = '587' }
|
|
if (-not $env:SMTP_USER) { $env:SMTP_USER = 'quantfortune@gmail.com' }
|
|
if (-not $env:SMTP_PASS) { $env:SMTP_PASS = 'wkbk mwbi aiqo yvwl' }
|
|
if (-not $env:SMTP_FROM_NAME) { $env:SMTP_FROM_NAME = 'Quantfortune Support' }
|
|
if (-not $env:RESET_OTP_SECRET) { $env:RESET_OTP_SECRET = 'change_this_secret' }
|
|
.\venv\Scripts\uvicorn.exe app.main:app --host 0.0.0.0 --port 8000
|