From ae76618f7aadb654e7c08cc4255c32d7208048dd Mon Sep 17 00:00:00 2001 From: paritosh18 Date: Tue, 9 Dec 2025 12:09:21 +0530 Subject: [PATCH] Add environment configuration template and update .gitignore for new env files --- .env.example | 44 ++++++++++++++++++++++++++++++++++++++++++++ .gitignore | 4 ++++ serverless.yml | 13 ++++++++++++- 3 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..03be5c3 --- /dev/null +++ b/.env.example @@ -0,0 +1,44 @@ +# Environment Configuration Template +# Copy this file to .env.dev, .env.test, or .env.uat and fill in the values + +# Database +DATABASE_URL= +DB_USERNAME= +DB_PASSWORD= +DB_DATABASE_NAME= +DB_HOSTNAME= +DB_PORT=5432 + +# Email Bypass (set to true for dev/test, false for production-like environments) +BY_PASS_EMAIL= +BYPASS_OTP= + +# Brevo Email Configuration +BREVO_EMAIL_API_KEY= +BREVO_API_BASEURL=https://api.brevo.com +BREVO_FROM_EMAIL= +BREVO_SMTP_HOST=smtp-relay.brevo.com +BREVO_SMTP_PORT=587 +BREVO_SMTP_USER= +BREVO_SMTP_PASS= + +# JWT Configuration +REFRESH_TOKEN_SECRET= +JWT_SECRET= +JWT_ACCESS_EXPIRATION_MINUTES=30 +JWT_REFRESH_EXPIRATION_DAYS=7 +JWT_RESET_PASSWORD_EXPIRATION_MINUTES=15 +JWT_VERIFY_EMAIL_EXPIRATION_MINUTES=15 + +# Security +SALT_ROUNDS= +NODE_ENV= + +# AWS S3 +S3_BUCKET_NAME= + +# Admin Configuration +MINGLAR_ADMIN_NAME= +MINGLAR_ADMIN_EMAIL= +AM_INVITATION_LINK= +HOST_LINK= diff --git a/.gitignore b/.gitignore index 96467e3..31c097d 100644 --- a/.gitignore +++ b/.gitignore @@ -40,10 +40,14 @@ lerna-debug.log* .env.test.local .env.production.local .env.local +.env.dev +.env.test +.env.uat # temp .tmp .temp +undefined/ # Runtime data pids diff --git a/serverless.yml b/serverless.yml index 4149e60..f776226 100644 --- a/serverless.yml +++ b/serverless.yml @@ -1,9 +1,20 @@ service: minglarDev - + +useDotenv: true + +params: + dev: + stage: dev + test: + stage: test + uat: + stage: uat + provider: name: aws runtime: nodejs22.x region: ap-south-1 + stage: ${opt:stage, 'dev'} versionFunctions: false memorySize: 512 # Apply Prisma layer to all functions