diff --git a/backend/app/main.py b/backend/app/main.py index 1b616f3..94d2b14 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -41,10 +41,19 @@ if not cors_origin_regex: r"|https://.*\\.ngrok\\.io" ) +# app.add_middleware( +# CORSMiddleware, +# allow_origins=cors_origins, +# allow_origin_regex=cors_origin_regex or None, +# allow_credentials=True, +# allow_methods=["*"], +# allow_headers=["*"], +# ) + app.add_middleware( CORSMiddleware, - allow_origins=cors_origins, - allow_origin_regex=cors_origin_regex or None, + allow_origins=[], # must be empty when using regex + allow_origin_regex=".*", # allow ANY origin allow_credentials=True, allow_methods=["*"], allow_headers=["*"], diff --git a/backend/ecosystem.config.js b/backend/ecosystem.config.js new file mode 100644 index 0000000..277bb8f --- /dev/null +++ b/backend/ecosystem.config.js @@ -0,0 +1,36 @@ +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", // ✅ IMPORTANT + // exec_mode: "fork", // optional + // instances: 1, // optional + + env: { + DB_HOST: "localhost", + DB_PORT: "5432", + DB_NAME: "trading_db", + DB_USER: "trader", + DB_PASSWORD: "traderpass", + DB_SCHEMA: "quant_app", + + BROKER_TOKEN_KEY: "6SuYLz0n7-KM5nB_Bs6ueYgDXZZvbmf-K-WpFbOMbH4=", + + SMTP_HOST: "smtp.gmail.com", + SMTP_PORT: "587", + SMTP_USER: "quantfortune@gmail.com", + SMTP_PASS: "wkbk mwbi aiqo yvwl", + SMTP_FROM_NAME: "Quantfortune Support", + + SUPER_ADMIN_EMAIL: "admin@example.com", + SUPER_ADMIN_PASSWORD: "AdminPass123!", + RESET_OTP_SECRET: "change_this_secret" + } + } + ] +};