forked from Shared/esg
documentation
This commit is contained in:
@@ -2,6 +2,16 @@
|
||||
|
||||
This guide explains all environment variables used in the ESG Inquiry Gateway system.
|
||||
|
||||
All local settings are in `.local.env`, organized into shared settings, routing,
|
||||
AMITIS authentication, and sections for Asia, Hamta, Moallem, Parsian and Tejaratnou.
|
||||
Copy `.env.example` to `.local.env` for a new installation.
|
||||
|
||||
The app and CLI commands load the file from the project root. Shell/container
|
||||
variables override `.local.env`, which overrides `.env` as a legacy fallback.
|
||||
Split files under `env/` and `.env.local` are no longer loaded. Restart after changes.
|
||||
|
||||
Docker Compose uses the single `.production.env` file and does not mount `env/`.
|
||||
|
||||
## Table of Contents
|
||||
- [Application Settings](#application-settings)
|
||||
- [Database Configuration](#database-configuration)
|
||||
@@ -27,11 +37,15 @@ OTEL_NODE_RESOURCE_DETECTORS=env,host,os
|
||||
|
||||
## Database Configuration
|
||||
|
||||
### MongoDB
|
||||
### PostgreSQL
|
||||
```env
|
||||
MONGODB_URI=mongodb://localhost:27017/inquiry-gateway
|
||||
DATABASE_URL=postgresql://esg:esg@localhost:5432/inquiry_gateway
|
||||
```
|
||||
|
||||
The application, TypeORM data source, and readiness probe use PostgreSQL. Run
|
||||
pending TypeORM migrations with `npm run migration:run`; use
|
||||
`npm run migration:revert` to revert the most recent migration.
|
||||
|
||||
## Authentication & Security
|
||||
|
||||
### API Authentication
|
||||
@@ -458,7 +472,7 @@ REAL_ESTATE_FALLBACK_ENABLED=false
|
||||
|
||||
## Security Best Practices
|
||||
|
||||
1. **Never commit `.env` to git** - Use `.env.example` as template
|
||||
1. **Never commit environment files containing secrets** - Use `.env.example` as template
|
||||
2. **Rotate credentials regularly** - Update passwords every 90 days
|
||||
3. **Use strong secrets** - Generate random strings for JWT secrets
|
||||
4. **Limit API key distribution** - One key per client application
|
||||
|
||||
Reference in New Issue
Block a user