Chanegs by Mohan from the server fro the fixes
This commit is contained in:
parent
9af712f77c
commit
6c3f2f8bcf
95
backend/ecosystem.config copy.js
Normal file
95
backend/ecosystem.config copy.js
Normal file
@ -0,0 +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 = {
|
||||||
|
apps: [
|
||||||
|
{
|
||||||
|
name: "Quantfortune - Backend",
|
||||||
|
cwd: "/SERVER_CLIENT/PRODUCTION/SIP_GoldBees_Backend/backend",
|
||||||
|
script: "bash",
|
||||||
|
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",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
@ -1,94 +1,35 @@
|
|||||||
// // 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: "bash",
|
script: "bash",
|
||||||
|
|
||||||
args: [
|
args: [
|
||||||
"-lc",
|
"-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"
|
`
|
||||||
|
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=v_GdTdOmIKhJztW1E3lxrXBDmhgCmA0MeoeM4wprqCk=
|
||||||
|
export RESET_OTP_SECRET=gNr0HlTQu8XhwvRnkoV2oUnmTTLV4c0s9vkG019jVlXQ5IhycTjPZO0xgWkfS4Wx7J8xuee5-rCVQpXYIK5XjQ
|
||||||
|
|
||||||
|
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",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
9
backend/geberate_keys.py
Normal file
9
backend/geberate_keys.py
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import secrets
|
||||||
|
|
||||||
|
# Generate a secure random key (URL-safe)
|
||||||
|
def generate_key(length=32):
|
||||||
|
return secrets.token_urlsafe(length)
|
||||||
|
|
||||||
|
print("BROKER_TOKEN_KEY =", generate_key())
|
||||||
|
print("RESET_OTP_SECRET =", generate_key())
|
||||||
|
print("GENERIC_SECRET =", generate_key())
|
||||||
Loading…
x
Reference in New Issue
Block a user