From 1fa0502d7dd9b38145fd4f576e8110933228058d Mon Sep 17 00:00:00 2001 From: Muhammad Ibrahim Date: Sun, 5 Oct 2025 19:27:55 +0100 Subject: [PATCH] Modified setup.sh to cater for new environment variables Added missing env variables in the env.example file --- backend/env.example | 2 ++ setup.sh | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/backend/env.example b/backend/env.example index 1db1fe7..6ef6243 100644 --- a/backend/env.example +++ b/backend/env.example @@ -1,5 +1,7 @@ # Database Configuration DATABASE_URL="postgresql://patchmon_user:p@tchm0n_p@55@localhost:5432/patchmon_db" +PM_DB_CONN_MAX_ATTEMPTS=30 +PM_DB_CONN_WAIT_INTERVAL=2 # Server Configuration PORT=3001 diff --git a/setup.sh b/setup.sh index e47d197..0908e14 100755 --- a/setup.sh +++ b/setup.sh @@ -793,9 +793,13 @@ create_env_files() { cat > backend/.env << EOF # Database Configuration DATABASE_URL="postgresql://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME" +PM_DB_CONN_MAX_ATTEMPTS=30 +PM_DB_CONN_WAIT_INTERVAL=2 # JWT Configuration JWT_SECRET="$JWT_SECRET" +JWT_EXPIRES_IN=1h +JWT_REFRESH_EXPIRES_IN=7d # Server Configuration PORT=$BACKEND_PORT @@ -807,6 +811,12 @@ API_VERSION=v1 # CORS Configuration CORS_ORIGIN="$SERVER_PROTOCOL_SEL://$FQDN" +# Session Configuration +SESSION_INACTIVITY_TIMEOUT_MINUTES=30 + +# User Configuration +DEFAULT_USER_ROLE=user + # Rate Limiting (times in milliseconds) RATE_LIMIT_WINDOW_MS=900000 RATE_LIMIT_MAX=5000 @@ -817,6 +827,7 @@ AGENT_RATE_LIMIT_MAX=1000 # Logging LOG_LEVEL=info +ENABLE_LOGGING=true EOF # Frontend .env