chore: consolidate env templates and remove Docker docs from master
- Merge .env.production.template into .env.example - Remove Docker Deployment section from CLAUDE.md (now on docker branch) - Update README.md to reference .env.example - Update environment variable documentation Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
56
README.md
56
README.md
@@ -116,7 +116,7 @@ award/
|
||||
│ └── package.json
|
||||
├── award-definitions/ # Award rule definitions (JSON)
|
||||
├── award.db # SQLite database (auto-created)
|
||||
├── .env.production.template # Production configuration template
|
||||
├── .env.example # Environment configuration template
|
||||
├── bunfig.toml # Bun configuration
|
||||
├── drizzle.config.js # Drizzle ORM configuration
|
||||
├── package.json
|
||||
@@ -149,20 +149,32 @@ cp .env.example .env
|
||||
|
||||
Edit `.env` with your configuration:
|
||||
```env
|
||||
# Application URL (for production deployment)
|
||||
VITE_APP_URL=https://awards.dj7nt.de
|
||||
# Environment (development/production)
|
||||
NODE_ENV=development
|
||||
|
||||
# Log Level (debug/info/warn/error)
|
||||
LOG_LEVEL=debug
|
||||
|
||||
# Server Port (default: 3001)
|
||||
PORT=3001
|
||||
|
||||
# Frontend URL (e.g., https://awards.dj7nt.de)
|
||||
# Leave empty for development (uses localhost)
|
||||
VITE_APP_URL=
|
||||
|
||||
# API Base URL (leave empty for same-domain deployment)
|
||||
VITE_API_BASE_URL=
|
||||
|
||||
# JWT Secret (generate with: openssl rand -base64 32)
|
||||
JWT_SECRET=your-generated-secret-here
|
||||
# Allowed CORS origins (comma-separated)
|
||||
# Add all domains that should access the API
|
||||
ALLOWED_ORIGINS=
|
||||
|
||||
# Environment
|
||||
NODE_ENV=production
|
||||
# JWT Secret (generate with: openssl rand -base64 32)
|
||||
JWT_SECRET=change-this-in-production
|
||||
```
|
||||
|
||||
**For development**: You can leave `.env` empty or use defaults.
|
||||
**For development**: Use defaults above.
|
||||
**For production**: Set `NODE_ENV=production`, `LOG_LEVEL=info`, and generate a strong `JWT_SECRET`.
|
||||
|
||||
4. Initialize the database with performance indexes:
|
||||
```bash
|
||||
@@ -414,20 +426,26 @@ bun run build
|
||||
Create `.env` in the project root:
|
||||
|
||||
```bash
|
||||
# Application URL
|
||||
VITE_APP_URL=https://awards.dj7nt.de
|
||||
|
||||
# API Base URL (empty for same-domain)
|
||||
VITE_API_BASE_URL=
|
||||
|
||||
# JWT Secret (generate with: openssl rand -base64 32)
|
||||
JWT_SECRET=your-generated-secret-here
|
||||
|
||||
# Environment
|
||||
NODE_ENV=production
|
||||
|
||||
# Database path (absolute path recommended)
|
||||
DATABASE_PATH=/path/to/award/award.db
|
||||
# Log Level (debug/info/warn/error)
|
||||
LOG_LEVEL=info
|
||||
|
||||
# Server Port (default: 3001)
|
||||
PORT=3001
|
||||
|
||||
# Frontend URL
|
||||
VITE_APP_URL=https://awards.dj7nt.de
|
||||
|
||||
# API Base URL (leave empty for same-domain deployment)
|
||||
VITE_API_BASE_URL=
|
||||
|
||||
# Allowed CORS origins (comma-separated)
|
||||
ALLOWED_ORIGINS=https://awards.dj7nt.de,https://www.awards.dj7nt.de
|
||||
|
||||
# JWT Secret (generate with: openssl rand -base64 32)
|
||||
JWT_SECRET=your-generated-secret-here
|
||||
```
|
||||
|
||||
**Security**: Ensure `.env` has restricted permissions:
|
||||
|
||||
Reference in New Issue
Block a user