Made Changes from server by mohan
This commit is contained in:
parent
d857f9d703
commit
78aa2bf201
@ -28,6 +28,7 @@ DEFAULT_DEV_ORIGINS = {
|
|||||||
"http://127.0.0.1:3000",
|
"http://127.0.0.1:3000",
|
||||||
"http://localhost:5173",
|
"http://localhost:5173",
|
||||||
"http://127.0.0.1:5173",
|
"http://127.0.0.1:5173",
|
||||||
|
"https://app.quantfortune.com"
|
||||||
}
|
}
|
||||||
PRODUCTION_ENV_NAMES = {"prod", "production"}
|
PRODUCTION_ENV_NAMES = {"prod", "production"}
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ def _db_config() -> dict[str, str | int]:
|
|||||||
if url:
|
if url:
|
||||||
return {"url": url}
|
return {"url": url}
|
||||||
|
|
||||||
password = os.getenv("DB_PASSWORD") or os.getenv("PGPASSWORD")
|
password = os.getenv("DB_PASSWORD") or os.getenv("PGPASSWORD") or "traderpass"
|
||||||
if not password and not is_non_prod:
|
if not password and not is_non_prod:
|
||||||
raise RuntimeError("DB_PASSWORD or PGPASSWORD must be configured in non-development environments")
|
raise RuntimeError("DB_PASSWORD or PGPASSWORD must be configured in non-development environments")
|
||||||
|
|
||||||
|
|||||||
@ -1,31 +1,95 @@
|
|||||||
|
// // module.exports = {
|
||||||
|
// // apps: [
|
||||||
|
// // {
|
||||||
|
// // name: "Quantfortune - Backend",
|
||||||
|
// // cwd: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
||||||
|
// // script: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend/.venv/bin/uvicorn",
|
||||||
|
// // args: "app.main:app --host 0.0.0.0 --port 3002",
|
||||||
|
// // interpreter: "none",
|
||||||
|
// // env: {
|
||||||
|
// // PYTHONPATH:
|
||||||
|
// // process.env.PYTHONPATH ||
|
||||||
|
// // "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend:/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
||||||
|
|
||||||
|
// // APP_ENV: process.env.APP_ENV || "production",
|
||||||
|
// // DB_HOST: process.env.DB_HOST,
|
||||||
|
// // DB_PORT: process.env.DB_PORT,
|
||||||
|
// // DB_NAME: process.env.DB_NAME,
|
||||||
|
// // DB_USER: process.env.DB_USER,
|
||||||
|
// // DB_PASSWORD: process.env.DB_PASSWORD,
|
||||||
|
// // DB_SCHEMA: process.env.DB_SCHEMA,
|
||||||
|
// // CORS_ORIGINS: process.env.CORS_ORIGINS,
|
||||||
|
// // BROKER_TOKEN_KEY: process.env.BROKER_TOKEN_KEY,
|
||||||
|
// // SMTP_HOST: process.env.SMTP_HOST,
|
||||||
|
// // SMTP_PORT: process.env.SMTP_PORT,
|
||||||
|
// // SMTP_USER: process.env.SMTP_USER,
|
||||||
|
// // SMTP_PASS: process.env.SMTP_PASS,
|
||||||
|
// // SMTP_FROM_NAME: process.env.SMTP_FROM_NAME,
|
||||||
|
// // RESET_OTP_SECRET: process.env.RESET_OTP_SECRET,
|
||||||
|
// // ENABLE_SUPER_ADMIN_BOOTSTRAP: process.env.ENABLE_SUPER_ADMIN_BOOTSTRAP,
|
||||||
|
// // SUPER_ADMIN_EMAIL: process.env.SUPER_ADMIN_EMAIL,
|
||||||
|
// // SUPER_ADMIN_PASSWORD: process.env.SUPER_ADMIN_PASSWORD,
|
||||||
|
// // },
|
||||||
|
// // },
|
||||||
|
// // ],
|
||||||
|
// // };
|
||||||
|
|
||||||
|
|
||||||
|
// module.exports = {
|
||||||
|
// apps: [
|
||||||
|
// {
|
||||||
|
// name: "Quantfortune - Backend",
|
||||||
|
// cwd: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
||||||
|
// script: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend/.venv/bin/uvicorn",
|
||||||
|
// args: "app.main:app --host 0.0.0.0 --port 3002",
|
||||||
|
// interpreter: "none",
|
||||||
|
// env: {
|
||||||
|
// PYTHONPATH:
|
||||||
|
// "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend:/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
||||||
|
|
||||||
|
// APP_ENV: "development",
|
||||||
|
|
||||||
|
// DB_HOST: "localhost",
|
||||||
|
// DB_PORT: "5432",
|
||||||
|
// DB_NAME: "trading_db",
|
||||||
|
// DB_USER: "trader",
|
||||||
|
// DB_PASSWORD: "traderpass",
|
||||||
|
// DB_SCHEMA: "quant_app",
|
||||||
|
|
||||||
|
// PGPASSWORD: "traderpass",
|
||||||
|
|
||||||
|
// CORS_ORIGINS:
|
||||||
|
// "http://localhost:3000,http://127.0.0.1:3000,http://localhost:5173,http://127.0.0.1:5173",
|
||||||
|
|
||||||
|
// BROKER_TOKEN_KEY: "dev-broker-token-key",
|
||||||
|
// RESET_OTP_SECRET: "dev-reset-otp-secret",
|
||||||
|
|
||||||
|
// SMTP_HOST: "",
|
||||||
|
// SMTP_PORT: "",
|
||||||
|
// SMTP_USER: "",
|
||||||
|
// SMTP_PASS: "",
|
||||||
|
// SMTP_FROM_NAME: "Quantfortune Support",
|
||||||
|
|
||||||
|
// ENABLE_SUPER_ADMIN_BOOTSTRAP: "false",
|
||||||
|
// SUPER_ADMIN_EMAIL: "",
|
||||||
|
// SUPER_ADMIN_PASSWORD: "",
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// };
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
apps: [
|
apps: [
|
||||||
{
|
{
|
||||||
name: "Quantfortune - Backend",
|
name: "Quantfortune - Backend",
|
||||||
cwd: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
cwd: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
||||||
script: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend/.venv/bin/uvicorn",
|
script: "bash",
|
||||||
args: "app.main:app --host 0.0.0.0 --port 3002",
|
args: [
|
||||||
|
"-lc",
|
||||||
|
"export PYTHONPATH=/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend:/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend && export APP_ENV=production && export DB_HOST=localhost && export DB_PORT=5432 && export DB_NAME=trading_db && export DB_USER=trader && export DB_PASSWORD=traderpass && export PGPASSWORD=traderpass && export DB_SCHEMA=quant_app && export BROKER_TOKEN_KEY=dev-broker-token-key && export RESET_OTP_SECRET=dev-reset-otp-secret && export CORS_ORIGINS='https://app.quantfortune.com' && exec /SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend/.venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 3002"
|
||||||
|
],
|
||||||
interpreter: "none",
|
interpreter: "none",
|
||||||
env: {
|
|
||||||
APP_ENV: process.env.APP_ENV || "production",
|
|
||||||
DB_HOST: process.env.DB_HOST,
|
|
||||||
DB_PORT: process.env.DB_PORT,
|
|
||||||
DB_NAME: process.env.DB_NAME,
|
|
||||||
DB_USER: process.env.DB_USER,
|
|
||||||
DB_PASSWORD: process.env.DB_PASSWORD,
|
|
||||||
DB_SCHEMA: process.env.DB_SCHEMA,
|
|
||||||
CORS_ORIGINS: process.env.CORS_ORIGINS,
|
|
||||||
BROKER_TOKEN_KEY: process.env.BROKER_TOKEN_KEY,
|
|
||||||
SMTP_HOST: process.env.SMTP_HOST,
|
|
||||||
SMTP_PORT: process.env.SMTP_PORT,
|
|
||||||
SMTP_USER: process.env.SMTP_USER,
|
|
||||||
SMTP_PASS: process.env.SMTP_PASS,
|
|
||||||
SMTP_FROM_NAME: process.env.SMTP_FROM_NAME,
|
|
||||||
RESET_OTP_SECRET: process.env.RESET_OTP_SECRET,
|
|
||||||
ENABLE_SUPER_ADMIN_BOOTSTRAP: process.env.ENABLE_SUPER_ADMIN_BOOTSTRAP,
|
|
||||||
SUPER_ADMIN_EMAIL: process.env.SUPER_ADMIN_EMAIL,
|
|
||||||
SUPER_ADMIN_PASSWORD: process.env.SUPER_ADMIN_PASSWORD,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -1,6 +1,9 @@
|
|||||||
|
alembic==1.13.3
|
||||||
annotated-doc==0.0.4
|
annotated-doc==0.0.4
|
||||||
annotated-types==0.7.0
|
annotated-types==0.7.0
|
||||||
anyio==4.12.1
|
anyio==4.12.1
|
||||||
|
argon2-cffi==25.1.0
|
||||||
|
argon2-cffi-bindings==25.1.0
|
||||||
beautifulsoup4==4.14.3
|
beautifulsoup4==4.14.3
|
||||||
certifi==2026.1.4
|
certifi==2026.1.4
|
||||||
cffi==2.0.0
|
cffi==2.0.0
|
||||||
@ -11,25 +14,34 @@ cryptography==46.0.3
|
|||||||
curl_cffi==0.13.0
|
curl_cffi==0.13.0
|
||||||
fastapi==0.128.0
|
fastapi==0.128.0
|
||||||
frozendict==2.4.7
|
frozendict==2.4.7
|
||||||
|
greenlet==3.3.1
|
||||||
h11==0.16.0
|
h11==0.16.0
|
||||||
idna==3.11
|
httpcore==1.0.9
|
||||||
httpx==0.27.2
|
httpx==0.27.2
|
||||||
|
idna==3.11
|
||||||
|
iniconfig==2.3.0
|
||||||
|
Mako==1.3.10
|
||||||
|
MarkupSafe==3.0.3
|
||||||
multitasking==0.0.12
|
multitasking==0.0.12
|
||||||
numpy==2.2.6
|
numpy==2.4.1
|
||||||
|
packaging==26.0
|
||||||
pandas==2.3.3
|
pandas==2.3.3
|
||||||
peewee==3.19.0
|
peewee==3.19.0
|
||||||
platformdirs==4.5.1
|
platformdirs==4.5.1
|
||||||
|
pluggy==1.6.0
|
||||||
protobuf==6.33.4
|
protobuf==6.33.4
|
||||||
psycopg2-binary==2.9.11
|
psycopg2-binary==2.9.11
|
||||||
SQLAlchemy==2.0.36
|
|
||||||
pycparser==2.23
|
pycparser==2.23
|
||||||
pydantic==2.12.5
|
pydantic==2.12.5
|
||||||
pydantic_core==2.41.5
|
pydantic_core==2.41.5
|
||||||
|
pytest==8.3.5
|
||||||
python-dateutil==2.9.0.post0
|
python-dateutil==2.9.0.post0
|
||||||
pytz==2025.2
|
pytz==2025.2
|
||||||
requests==2.32.5
|
requests==2.32.5
|
||||||
six==1.17.0
|
six==1.17.0
|
||||||
|
sniffio==1.3.1
|
||||||
soupsieve==2.8.1
|
soupsieve==2.8.1
|
||||||
|
SQLAlchemy==2.0.36
|
||||||
starlette==0.50.0
|
starlette==0.50.0
|
||||||
ta==0.11.0
|
ta==0.11.0
|
||||||
typing-inspection==0.4.2
|
typing-inspection==0.4.2
|
||||||
@ -39,6 +51,3 @@ urllib3==2.6.3
|
|||||||
uvicorn==0.40.0
|
uvicorn==0.40.0
|
||||||
websockets==16.0
|
websockets==16.0
|
||||||
yfinance==1.0
|
yfinance==1.0
|
||||||
alembic==1.13.3
|
|
||||||
pytest==8.3.5
|
|
||||||
argon2-cffi==25.1.0
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user