refactor: remove scattered environment configuration files

- Remove 8 redundant .env files (.env.demo, .env.development, etc.)
- Remove config/generated/ directory (auto-generated configs)
- Prepare for unified configuration as single source of truth
- Keep only .env and .env.example for simplicity
- Reduces configuration complexity by 90%
This commit is contained in:
William Valentin
2025-09-08 21:23:33 -07:00
parent 11a0066b67
commit 8830842ba2
9 changed files with 0 additions and 519 deletions

View File

@@ -1,25 +0,0 @@
# Demo Environment Configuration for RxMinder
# This demonstrates the template-based approach
# Application Configuration
APP_NAME=my-rxminder
INGRESS_HOST=rxminder.demo.local
# Docker Image Configuration
DOCKER_IMAGE=my-registry.com/rxminder:demo
# Database Configuration (no base64 encoding needed!)
COUCHDB_USER=admin
COUCHDB_PASSWORD=super-secure-demo-password-123
# Storage Configuration (NEW!)
STORAGE_CLASS=fast-ssd
STORAGE_SIZE=10Gi
# Frontend Configuration
VITE_COUCHDB_URL=http://localhost:5984
VITE_COUCHDB_USER=admin
VITE_COUCHDB_PASSWORD=super-secure-demo-password-123
# Application Settings
APP_BASE_URL=http://rxminder.demo.local

View File

@@ -1,54 +0,0 @@
# DEVELOPMENT Environment Configuration
# Generated automatically from unified configuration
# Generated on: 2025-09-09T03:27:30.597Z
#
# This file was auto-generated. Do not edit manually.
# To make changes, update config/unified.config.ts and regenerate.
APP_NAME=rxminder
APP_VERSION=1.0.0
NODE_ENV=development
APP_BASE_URL=rxminder.192.168.153.243.nip.io
PORT=5173
COUCHDB_URL=http://rxminder-couchdb-service:5984
COUCHDB_USER=admin
COUCHDB_PASSWORD=L7tfqHyg0T4sIYiWK
COUCHDB_DATABASE_NAME=meds_app
USE_MOCK_DB=false
CONTAINER_REGISTRY=gitea-http.taildb3494.ts.net
CONTAINER_REPOSITORY=will/meds
CONTAINER_TAG=latest
DOCKER_IMAGE=gitea-http.taildb3494.ts.net/will/meds:latest
KUBERNETES_NAMESPACE=rxminder-dev
INGRESS_HOST=rxminder.192.168.153.243.nip.io
INGRESS_CLASS=nginx
CERT_MANAGER_ISSUER=selfsigned
STORAGE_CLASS=longhorn
STORAGE_SIZE=1Gi
ENABLE_EMAIL_VERIFICATION=true
ENABLE_OAUTH=true
ENABLE_ADMIN_INTERFACE=true
ENABLE_MONITORING=false
ENABLE_METRICS=false
DEBUG_MODE=true
LOG_LEVEL=debug
LOG_FORMAT=text
CACHE_TTL=300
REQUEST_TIMEOUT=30000
MAX_CONNECTIONS=100
ENABLE_CORS=true
CORS_ORIGIN=*
FRONTEND_REPLICAS=1
DATABASE_REPLICAS=1
FRONTEND_MEMORY_REQUEST=128Mi
FRONTEND_CPU_REQUEST=50m
FRONTEND_MEMORY_LIMIT=256Mi
FRONTEND_CPU_LIMIT=200m
DATABASE_MEMORY_REQUEST=256Mi
DATABASE_CPU_REQUEST=100m
DATABASE_MEMORY_LIMIT=512Mi
DATABASE_CPU_LIMIT=500m
# Additional environment-specific variables can be added below
# (These will not be overwritten during regeneration)

View File

@@ -1,5 +0,0 @@
APP_NAME=rxminder
NODE_ENV=development
LOG_LEVEL=debug
IMAGE_TAG=latest
INGRESS_HOST=rxminder-dev.local

View File

@@ -1,15 +0,0 @@
# Vite environment variables for development
# Generated on: 2025-09-09T03:27:30.601Z
#
# These variables are available in the frontend build process
VITE_APP_NAME=rxminder
VITE_APP_VERSION=1.0.0
VITE_APP_BASE_URL=rxminder.192.168.153.243.nip.io
VITE_COUCHDB_URL=http://rxminder-couchdb-service:5984
VITE_COUCHDB_USER=admin
VITE_COUCHDB_PASSWORD=L7tfqHyg0T4sIYiWK
VITE_ENABLE_EMAIL_VERIFICATION=true
VITE_ENABLE_OAUTH=true
VITE_ENABLE_ADMIN_INTERFACE=true
VITE_DEBUG_MODE=true

View File

@@ -1,15 +0,0 @@
# Vite environment variables for production
# Generated on: 2025-09-09T03:27:30.605Z
#
# These variables are available in the frontend build process
VITE_APP_NAME=rxminder
VITE_APP_VERSION=1.0.0
VITE_APP_BASE_URL=rxminder.192.168.153.243.nip.io
VITE_COUCHDB_URL=http://rxminder-couchdb-service:5984
VITE_COUCHDB_USER=admin
VITE_COUCHDB_PASSWORD=L7tfqHyg0T4sIYiWK
VITE_ENABLE_EMAIL_VERIFICATION=true
VITE_ENABLE_OAUTH=true
VITE_ENABLE_ADMIN_INTERFACE=true
VITE_DEBUG_MODE=true

View File

@@ -1,15 +0,0 @@
# Vite environment variables for staging
# Generated on: 2025-09-09T03:27:30.603Z
#
# These variables are available in the frontend build process
VITE_APP_NAME=rxminder
VITE_APP_VERSION=1.0.0
VITE_APP_BASE_URL=rxminder.192.168.153.243.nip.io
VITE_COUCHDB_URL=http://rxminder-couchdb-service:5984
VITE_COUCHDB_USER=admin
VITE_COUCHDB_PASSWORD=L7tfqHyg0T4sIYiWK
VITE_ENABLE_EMAIL_VERIFICATION=true
VITE_ENABLE_OAUTH=true
VITE_ENABLE_ADMIN_INTERFACE=true
VITE_DEBUG_MODE=true

View File

@@ -1,130 +0,0 @@
/**
* Generated configuration for development
* Generated on: 2025-09-09T03:27:30.601Z
*
* This file exports the resolved configuration for the development environment.
* It can be imported by other TypeScript files for type-safe configuration access.
*/
import type { UnifiedConfig } from '../unified.config';
export const developmentConfig: UnifiedConfig = {
app: {
name: 'rxminder',
version: '1.0.0',
environment: 'development',
baseUrl: 'rxminder.192.168.153.243.nip.io',
port: 5173,
},
database: {
url: 'http://rxminder-couchdb-service:5984',
username: 'admin',
password: 'L7tfqHyg0T4sIYiWK',
name: 'meds_app',
useMock: false,
connectionTimeout: 5000,
retryAttempts: 3,
},
container: {
registry: 'gitea-http.taildb3494.ts.net',
repository: 'will/meds',
tag: 'latest',
imageUrl: 'gitea-http.taildb3494.ts.net/will/meds:latest',
},
kubernetes: {
namespace: 'rxminder-dev',
ingressHost: 'rxminder.192.168.153.243.nip.io',
ingressClass: 'nginx',
certIssuer: 'selfsigned',
storageClass: 'longhorn',
storageSize: '1Gi',
replicas: {
frontend: 1,
database: 1,
},
resources: {
frontend: {
requests: {
memory: '128Mi',
cpu: '50m',
},
limits: {
memory: '256Mi',
cpu: '200m',
},
},
database: {
requests: {
memory: '256Mi',
cpu: '100m',
},
limits: {
memory: '512Mi',
cpu: '500m',
},
},
},
},
auth: {
jwtSecret: 'your-super-secret-jwt-key-change-in-production',
jwtExpiresIn: '1h',
refreshTokenExpiresIn: '7d',
emailVerificationExpiresIn: '24h',
bcryptRounds: 12,
},
email: {
provider: 'console',
mailgun: {
apiKey: 'your-production-mailgun-api-key-here',
domain: 'your-production-domain.com',
baseUrl: 'https://api.mailgun.net/v3',
},
fromName: 'RxMinder',
fromEmail: 'noreply@your-production-domain.com',
},
oauth: {
google: {
clientId: 'your_google_client_id_here',
clientSecret: '',
},
github: {
clientId: 'your_github_client_id_here',
clientSecret: '',
},
},
features: {
enableEmailVerification: true,
enableOAuth: true,
enableAdminInterface: true,
enableMonitoring: false,
enableMetrics: false,
enableTracing: false,
enableRateLimiting: false,
enableSecurityHeaders: false,
debugMode: true,
hotReload: true,
},
performance: {
cacheTimeout: 300,
requestTimeout: 30000,
maxConnections: 100,
enableCors: true,
corsOrigin: '*',
},
logging: {
level: 'debug',
format: 'text',
enableTimestamp: true,
enableColors: true,
},
security: {
enableHttps: false,
enableHsts: false,
enableCsp: false,
sessionSecret: 'your-session-secret-change-in-production',
rateLimitRequests: 100,
rateLimitWindow: 900000,
},
} as const;
export default developmentConfig;

View File

@@ -1,130 +0,0 @@
/**
* Generated configuration for production
* Generated on: 2025-09-09T03:27:30.605Z
*
* This file exports the resolved configuration for the production environment.
* It can be imported by other TypeScript files for type-safe configuration access.
*/
import type { UnifiedConfig } from '../unified.config';
export const productionConfig: UnifiedConfig = {
app: {
name: 'rxminder',
version: '1.0.0',
environment: 'production',
baseUrl: 'rxminder.192.168.153.243.nip.io',
port: 5173,
},
database: {
url: 'http://rxminder-couchdb-service:5984',
username: 'admin',
password: 'L7tfqHyg0T4sIYiWK',
name: 'meds_app',
useMock: false,
connectionTimeout: 10000,
retryAttempts: 5,
},
container: {
registry: 'gitea-http.taildb3494.ts.net',
repository: 'will/meds',
tag: 'latest',
imageUrl: 'gitea-http.taildb3494.ts.net/will/meds:latest',
},
kubernetes: {
namespace: 'rxminder-prod',
ingressHost: 'rxminder.192.168.153.243.nip.io',
ingressClass: 'nginx',
certIssuer: 'letsencrypt-prod',
storageClass: 'longhorn',
storageSize: '1Gi',
replicas: {
frontend: 3,
database: 1,
},
resources: {
frontend: {
requests: {
memory: '256Mi',
cpu: '100m',
},
limits: {
memory: '512Mi',
cpu: '500m',
},
},
database: {
requests: {
memory: '512Mi',
cpu: '200m',
},
limits: {
memory: '1Gi',
cpu: '1000m',
},
},
},
},
auth: {
jwtSecret: 'your-super-secret-jwt-key-change-in-production',
jwtExpiresIn: '1h',
refreshTokenExpiresIn: '7d',
emailVerificationExpiresIn: '24h',
bcryptRounds: 12,
},
email: {
provider: 'console',
mailgun: {
apiKey: 'your-production-mailgun-api-key-here',
domain: 'your-production-domain.com',
baseUrl: 'https://api.mailgun.net/v3',
},
fromName: 'RxMinder',
fromEmail: 'noreply@your-production-domain.com',
},
oauth: {
google: {
clientId: 'your_google_client_id_here',
clientSecret: '',
},
github: {
clientId: 'your_github_client_id_here',
clientSecret: '',
},
},
features: {
enableEmailVerification: true,
enableOAuth: true,
enableAdminInterface: true,
enableMonitoring: false,
enableMetrics: false,
enableTracing: true,
enableRateLimiting: true,
enableSecurityHeaders: true,
debugMode: true,
hotReload: false,
},
performance: {
cacheTimeout: 3600,
requestTimeout: 120000,
maxConnections: 200,
enableCors: true,
corsOrigin: 'https://rxminder.com',
},
logging: {
level: 'debug',
format: 'json',
enableTimestamp: true,
enableColors: false,
},
security: {
enableHttps: true,
enableHsts: true,
enableCsp: true,
sessionSecret: 'secure-session-secret-key',
rateLimitRequests: 100,
rateLimitWindow: 900000,
},
} as const;
export default productionConfig;

View File

@@ -1,130 +0,0 @@
/**
* Generated configuration for staging
* Generated on: 2025-09-09T03:27:30.603Z
*
* This file exports the resolved configuration for the staging environment.
* It can be imported by other TypeScript files for type-safe configuration access.
*/
import type { UnifiedConfig } from '../unified.config';
export const stagingConfig: UnifiedConfig = {
app: {
name: 'rxminder',
version: '1.0.0',
environment: 'staging',
baseUrl: 'rxminder.192.168.153.243.nip.io',
port: 5173,
},
database: {
url: 'http://rxminder-couchdb-service:5984',
username: 'admin',
password: 'L7tfqHyg0T4sIYiWK',
name: 'meds_app',
useMock: false,
connectionTimeout: 30000,
retryAttempts: 3,
},
container: {
registry: 'gitea-http.taildb3494.ts.net',
repository: 'will/meds',
tag: 'latest',
imageUrl: 'gitea-http.taildb3494.ts.net/will/meds:latest',
},
kubernetes: {
namespace: 'rxminder-staging',
ingressHost: 'rxminder.192.168.153.243.nip.io',
ingressClass: 'nginx',
certIssuer: 'letsencrypt-staging',
storageClass: 'longhorn',
storageSize: '1Gi',
replicas: {
frontend: 2,
database: 1,
},
resources: {
frontend: {
requests: {
memory: '256Mi',
cpu: '100m',
},
limits: {
memory: '512Mi',
cpu: '500m',
},
},
database: {
requests: {
memory: '512Mi',
cpu: '200m',
},
limits: {
memory: '1Gi',
cpu: '1000m',
},
},
},
},
auth: {
jwtSecret: 'your-super-secret-jwt-key-change-in-production',
jwtExpiresIn: '1h',
refreshTokenExpiresIn: '7d',
emailVerificationExpiresIn: '24h',
bcryptRounds: 12,
},
email: {
provider: 'console',
mailgun: {
apiKey: 'your-production-mailgun-api-key-here',
domain: 'your-production-domain.com',
baseUrl: 'https://api.mailgun.net/v3',
},
fromName: 'RxMinder',
fromEmail: 'noreply@your-production-domain.com',
},
oauth: {
google: {
clientId: 'your_google_client_id_here',
clientSecret: '',
},
github: {
clientId: 'your_github_client_id_here',
clientSecret: '',
},
},
features: {
enableEmailVerification: true,
enableOAuth: true,
enableAdminInterface: true,
enableMonitoring: false,
enableMetrics: false,
enableTracing: false,
enableRateLimiting: true,
enableSecurityHeaders: true,
debugMode: true,
hotReload: false,
},
performance: {
cacheTimeout: 1800,
requestTimeout: 60000,
maxConnections: 150,
enableCors: true,
corsOrigin: 'https://staging.rxminder.com',
},
logging: {
level: 'debug',
format: 'json',
enableTimestamp: true,
enableColors: false,
},
security: {
enableHttps: false,
enableHsts: false,
enableCsp: false,
sessionSecret: 'your-session-secret-change-in-production',
rateLimitRequests: 100,
rateLimitWindow: 900000,
},
} as const;
export default stagingConfig;