File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Dester API - Environment Variables Template
2+ # Copy this file to .env.local and fill in your values
3+
14# Server Configuration
25NODE_ENV = development
36PORT = 3000
47
5- # Database
6- DATABASE_URL = file:./dev.db
8+ # PostgreSQL Database (from docker-compose.dev.yml)
9+ DATABASE_URL = postgresql://dester:dester_dev@localhost:5432/dester_dev?schema=public
10+ DATABASE_CONNECTION_LIMIT = 10
11+ DATABASE_POOL_TIMEOUT = 10
712
8- # Logging
9- LOG_LEVEL = info
13+ # Authentication (CHANGE THESE IN PRODUCTION!)
14+ JWT_SECRET = change-this-in-production-min-32-chars-long-jwt-secret-key
15+ JWT_EXPIRES_IN = 7d
16+ REFRESH_TOKEN_SECRET = change-this-refresh-secret-min-32-chars-long-key
17+ REFRESH_TOKEN_EXPIRES_IN = 30d
18+ API_KEY_PREFIX = dester
19+
20+ # Redis Cache (from docker-compose.dev.yml)
21+ CACHE_ENABLED = true
22+ REDIS_URL = redis://:redis_dev@localhost:6379
23+ CACHE_TTL = 3600
1024
1125# CORS
1226CORS_ORIGIN = http://localhost:5173
27+ WEB_URL = http://localhost:5173
1328
14- # API Keys
15- TMDB_API_KEY =
29+ # External APIs
30+ TMDB_API_KEY = your-tmdb-api-key-here
1631
1732# Rate Limiting
1833RATE_LIMIT_WINDOW_MS = 900000
1934RATE_LIMIT_MAX_REQUESTS = 100
35+
36+ # Logging
37+ LOG_LEVEL = debug
38+
39+ # Backup Configuration
40+ # Set to true to use Docker's pg_dump (recommended when PostgreSQL runs in Docker)
41+ USE_DOCKER_PGDUMP = true
42+ POSTGRES_CONTAINER_NAME = dester-postgres-dev
43+
44+ # Optional: Backup directory (defaults to ./backups)
45+ # BACKUP_DIR=/path/to/backups
Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ COPY --from=builder /app/apps/api/src/generated ./src/generated
4949COPY apps/api/docker-entrypoint.sh /usr/local/bin/
5050RUN chmod +x /usr/local/bin/docker-entrypoint.sh
5151
52- # Install netcat for healthcheck
53- RUN apk add --no-cache netcat-openbsd
52+ # Install netcat for healthcheck and PostgreSQL client tools for backups
53+ RUN apk add --no-cache netcat-openbsd postgresql-client
5454
5555# Create logs directory
5656RUN mkdir -p logs backups
Original file line number Diff line number Diff line change 1010 */
1111
1212// Load environment variables from .env file
13+ // .env.local takes precedence over .env
1314import { config } from "dotenv" ;
14- config ( ) ;
15+ config ( { path : ".env.local" } ) ; // Load .env.local first (if exists)
16+ config ( ) ; // Then load .env (won't override existing vars)
1517
1618import { z } from "zod" ;
1719
You can’t perform that action at this time.
0 commit comments