feat: update generated configs and environment files
- Regenerate all environment-specific config files with unified config - Update Vite environment files for all environments (dev/staging/prod) - Update Docker environment files with current configuration - Update Kubernetes config.env files for development and production - Add staging environment configurations and overlays - Ensures all generated files reflect unified configuration system
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# DEVELOPMENT Environment Configuration
|
# DEVELOPMENT Environment Configuration
|
||||||
# Generated automatically from unified configuration
|
# Generated automatically from unified configuration
|
||||||
# Generated on: 2025-09-08T16:32:25.385Z
|
# Generated on: 2025-09-09T03:27:30.597Z
|
||||||
#
|
#
|
||||||
# This file was auto-generated. Do not edit manually.
|
# This file was auto-generated. Do not edit manually.
|
||||||
# To make changes, update config/unified.config.ts and regenerate.
|
# To make changes, update config/unified.config.ts and regenerate.
|
||||||
@@ -22,7 +22,7 @@ DOCKER_IMAGE=gitea-http.taildb3494.ts.net/will/meds:latest
|
|||||||
KUBERNETES_NAMESPACE=rxminder-dev
|
KUBERNETES_NAMESPACE=rxminder-dev
|
||||||
INGRESS_HOST=rxminder.192.168.153.243.nip.io
|
INGRESS_HOST=rxminder.192.168.153.243.nip.io
|
||||||
INGRESS_CLASS=nginx
|
INGRESS_CLASS=nginx
|
||||||
CERT_MANAGER_ISSUER=letsencrypt-prod
|
CERT_MANAGER_ISSUER=selfsigned
|
||||||
STORAGE_CLASS=longhorn
|
STORAGE_CLASS=longhorn
|
||||||
STORAGE_SIZE=1Gi
|
STORAGE_SIZE=1Gi
|
||||||
ENABLE_EMAIL_VERIFICATION=true
|
ENABLE_EMAIL_VERIFICATION=true
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Vite environment variables for development
|
# Vite environment variables for development
|
||||||
# Generated on: 2025-09-08T16:32:25.392Z
|
# Generated on: 2025-09-09T03:27:30.601Z
|
||||||
#
|
#
|
||||||
# These variables are available in the frontend build process
|
# These variables are available in the frontend build process
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Vite environment variables for production
|
# Vite environment variables for production
|
||||||
# Generated on: 2025-09-08T16:25:25.057Z
|
# Generated on: 2025-09-09T03:27:30.605Z
|
||||||
#
|
#
|
||||||
# These variables are available in the frontend build process
|
# These variables are available in the frontend build process
|
||||||
|
|
||||||
|
|||||||
15
.env.vite.staging
Normal file
15
.env.vite.staging
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# 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
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Generated configuration for development
|
* Generated configuration for development
|
||||||
* Generated on: 2025-09-08T16:32:25.392Z
|
* Generated on: 2025-09-09T03:27:30.601Z
|
||||||
*
|
*
|
||||||
* This file exports the resolved configuration for the development environment.
|
* This file exports the resolved configuration for the development environment.
|
||||||
* It can be imported by other TypeScript files for type-safe configuration access.
|
* It can be imported by other TypeScript files for type-safe configuration access.
|
||||||
@@ -22,7 +22,7 @@ export const developmentConfig: UnifiedConfig = {
|
|||||||
password: 'L7tfqHyg0T4sIYiWK',
|
password: 'L7tfqHyg0T4sIYiWK',
|
||||||
name: 'meds_app',
|
name: 'meds_app',
|
||||||
useMock: false,
|
useMock: false,
|
||||||
connectionTimeout: 30000,
|
connectionTimeout: 5000,
|
||||||
retryAttempts: 3,
|
retryAttempts: 3,
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
@@ -35,7 +35,7 @@ export const developmentConfig: UnifiedConfig = {
|
|||||||
namespace: 'rxminder-dev',
|
namespace: 'rxminder-dev',
|
||||||
ingressHost: 'rxminder.192.168.153.243.nip.io',
|
ingressHost: 'rxminder.192.168.153.243.nip.io',
|
||||||
ingressClass: 'nginx',
|
ingressClass: 'nginx',
|
||||||
certIssuer: 'letsencrypt-prod',
|
certIssuer: 'selfsigned',
|
||||||
storageClass: 'longhorn',
|
storageClass: 'longhorn',
|
||||||
storageSize: '1Gi',
|
storageSize: '1Gi',
|
||||||
replicas: {
|
replicas: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/**
|
/**
|
||||||
* Generated configuration for production
|
* Generated configuration for production
|
||||||
* Generated on: 2025-09-08T16:25:25.058Z
|
* Generated on: 2025-09-09T03:27:30.605Z
|
||||||
*
|
*
|
||||||
* This file exports the resolved configuration for the production environment.
|
* This file exports the resolved configuration for the production environment.
|
||||||
* It can be imported by other TypeScript files for type-safe configuration access.
|
* It can be imported by other TypeScript files for type-safe configuration access.
|
||||||
@@ -22,8 +22,8 @@ export const productionConfig: UnifiedConfig = {
|
|||||||
password: 'L7tfqHyg0T4sIYiWK',
|
password: 'L7tfqHyg0T4sIYiWK',
|
||||||
name: 'meds_app',
|
name: 'meds_app',
|
||||||
useMock: false,
|
useMock: false,
|
||||||
connectionTimeout: 30000,
|
connectionTimeout: 10000,
|
||||||
retryAttempts: 3,
|
retryAttempts: 5,
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
registry: 'gitea-http.taildb3494.ts.net',
|
registry: 'gitea-http.taildb3494.ts.net',
|
||||||
@@ -66,7 +66,7 @@ export const productionConfig: UnifiedConfig = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
auth: {
|
auth: {
|
||||||
jwtSecret: 'my-production-jwt-secret',
|
jwtSecret: 'your-super-secret-jwt-key-change-in-production',
|
||||||
jwtExpiresIn: '1h',
|
jwtExpiresIn: '1h',
|
||||||
refreshTokenExpiresIn: '7d',
|
refreshTokenExpiresIn: '7d',
|
||||||
emailVerificationExpiresIn: '24h',
|
emailVerificationExpiresIn: '24h',
|
||||||
@@ -106,10 +106,10 @@ export const productionConfig: UnifiedConfig = {
|
|||||||
},
|
},
|
||||||
performance: {
|
performance: {
|
||||||
cacheTimeout: 3600,
|
cacheTimeout: 3600,
|
||||||
requestTimeout: 30000,
|
requestTimeout: 120000,
|
||||||
maxConnections: 200,
|
maxConnections: 200,
|
||||||
enableCors: true,
|
enableCors: true,
|
||||||
corsOrigin: '*',
|
corsOrigin: 'https://rxminder.com',
|
||||||
},
|
},
|
||||||
logging: {
|
logging: {
|
||||||
level: 'debug',
|
level: 'debug',
|
||||||
@@ -121,7 +121,7 @@ export const productionConfig: UnifiedConfig = {
|
|||||||
enableHttps: true,
|
enableHttps: true,
|
||||||
enableHsts: true,
|
enableHsts: true,
|
||||||
enableCsp: true,
|
enableCsp: true,
|
||||||
sessionSecret: 'my-production-session-secret',
|
sessionSecret: 'secure-session-secret-key',
|
||||||
rateLimitRequests: 100,
|
rateLimitRequests: 100,
|
||||||
rateLimitWindow: 900000,
|
rateLimitWindow: 900000,
|
||||||
},
|
},
|
||||||
|
|||||||
130
config/generated/staging.config.ts
Normal file
130
config/generated/staging.config.ts
Normal file
@@ -0,0 +1,130 @@
|
|||||||
|
/**
|
||||||
|
* 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;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
# Docker environment for development
|
# Docker environment for development
|
||||||
# Generated on: 2025-09-08T16:32:25.391Z
|
# Generated on: 2025-09-09T03:27:30.600Z
|
||||||
|
|
||||||
# Container Configuration
|
# Container Configuration
|
||||||
DOCKER_IMAGE=gitea-http.taildb3494.ts.net/will/meds:latest
|
DOCKER_IMAGE=gitea-http.taildb3494.ts.net/will/meds:latest
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Kubernetes configuration for development
|
# Kubernetes configuration for development
|
||||||
# Generated automatically from unified configuration
|
# Generated automatically from unified configuration
|
||||||
# Generated on: 2025-09-08T16:32:25.389Z
|
# Generated on: 2025-09-09T03:27:30.598Z
|
||||||
|
|
||||||
APP_NAME=rxminder
|
APP_NAME=rxminder
|
||||||
APP_VERSION=1.0.0
|
APP_VERSION=1.0.0
|
||||||
@@ -15,7 +15,7 @@ USE_MOCK_DB=false
|
|||||||
KUBERNETES_NAMESPACE=rxminder-dev
|
KUBERNETES_NAMESPACE=rxminder-dev
|
||||||
INGRESS_HOST=rxminder.192.168.153.243.nip.io
|
INGRESS_HOST=rxminder.192.168.153.243.nip.io
|
||||||
INGRESS_CLASS=nginx
|
INGRESS_CLASS=nginx
|
||||||
CERT_MANAGER_ISSUER=letsencrypt-prod
|
CERT_MANAGER_ISSUER=selfsigned
|
||||||
STORAGE_CLASS=longhorn
|
STORAGE_CLASS=longhorn
|
||||||
STORAGE_SIZE=1Gi
|
STORAGE_SIZE=1Gi
|
||||||
ENABLE_EMAIL_VERIFICATION=true
|
ENABLE_EMAIL_VERIFICATION=true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Kubernetes configuration for production
|
# Kubernetes configuration for production
|
||||||
# Generated automatically from unified configuration
|
# Generated automatically from unified configuration
|
||||||
# Generated on: 2025-09-08T16:25:25.055Z
|
# Generated on: 2025-09-09T03:27:30.604Z
|
||||||
|
|
||||||
APP_NAME=rxminder
|
APP_NAME=rxminder
|
||||||
APP_VERSION=1.0.0
|
APP_VERSION=1.0.0
|
||||||
@@ -27,10 +27,10 @@ DEBUG_MODE=true
|
|||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
LOG_FORMAT=json
|
LOG_FORMAT=json
|
||||||
CACHE_TTL=3600
|
CACHE_TTL=3600
|
||||||
REQUEST_TIMEOUT=30000
|
REQUEST_TIMEOUT=120000
|
||||||
MAX_CONNECTIONS=200
|
MAX_CONNECTIONS=200
|
||||||
ENABLE_CORS=true
|
ENABLE_CORS=true
|
||||||
CORS_ORIGIN=*
|
CORS_ORIGIN=https://rxminder.com
|
||||||
FRONTEND_REPLICAS=3
|
FRONTEND_REPLICAS=3
|
||||||
DATABASE_REPLICAS=1
|
DATABASE_REPLICAS=1
|
||||||
FRONTEND_MEMORY_REQUEST=256Mi
|
FRONTEND_MEMORY_REQUEST=256Mi
|
||||||
|
|||||||
43
k8s-kustomize/overlays/staging/config.env
Normal file
43
k8s-kustomize/overlays/staging/config.env
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Kubernetes configuration for staging
|
||||||
|
# Generated automatically from unified configuration
|
||||||
|
# Generated on: 2025-09-09T03:27:30.602Z
|
||||||
|
|
||||||
|
APP_NAME=rxminder
|
||||||
|
APP_VERSION=1.0.0
|
||||||
|
NODE_ENV=staging
|
||||||
|
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
|
||||||
|
KUBERNETES_NAMESPACE=rxminder-staging
|
||||||
|
INGRESS_HOST=rxminder.192.168.153.243.nip.io
|
||||||
|
INGRESS_CLASS=nginx
|
||||||
|
CERT_MANAGER_ISSUER=letsencrypt-staging
|
||||||
|
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=json
|
||||||
|
CACHE_TTL=1800
|
||||||
|
REQUEST_TIMEOUT=60000
|
||||||
|
MAX_CONNECTIONS=150
|
||||||
|
ENABLE_CORS=true
|
||||||
|
CORS_ORIGIN=https://staging.rxminder.com
|
||||||
|
FRONTEND_REPLICAS=2
|
||||||
|
DATABASE_REPLICAS=1
|
||||||
|
FRONTEND_MEMORY_REQUEST=256Mi
|
||||||
|
FRONTEND_CPU_REQUEST=100m
|
||||||
|
FRONTEND_MEMORY_LIMIT=512Mi
|
||||||
|
FRONTEND_CPU_LIMIT=500m
|
||||||
|
DATABASE_MEMORY_REQUEST=512Mi
|
||||||
|
DATABASE_CPU_REQUEST=200m
|
||||||
|
DATABASE_MEMORY_LIMIT=1Gi
|
||||||
|
DATABASE_CPU_LIMIT=1000m
|
||||||
73
k8s-kustomize/overlays/staging/kustomization.yaml
Normal file
73
k8s-kustomize/overlays/staging/kustomization.yaml
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||||
|
kind: Kustomization
|
||||||
|
|
||||||
|
metadata:
|
||||||
|
name: rxminder-staging
|
||||||
|
|
||||||
|
# Reference the base configuration
|
||||||
|
resources:
|
||||||
|
- ../../base
|
||||||
|
- namespace.yaml
|
||||||
|
|
||||||
|
# Override namespace for staging
|
||||||
|
namespace: rxminder-staging
|
||||||
|
|
||||||
|
# Staging-specific labels
|
||||||
|
labels:
|
||||||
|
- pairs:
|
||||||
|
environment: staging
|
||||||
|
tier: staging
|
||||||
|
|
||||||
|
# Staging image tags and configurations
|
||||||
|
images:
|
||||||
|
- name: frontend-image
|
||||||
|
newName: gitea-http.taildb3494.ts.net/will/meds
|
||||||
|
newTag: latest
|
||||||
|
- name: couchdb-image
|
||||||
|
newName: couchdb
|
||||||
|
newTag: 3.3.2
|
||||||
|
|
||||||
|
# Staging replicas
|
||||||
|
replicas:
|
||||||
|
- name: rxminder-frontend
|
||||||
|
count: 2
|
||||||
|
- name: rxminder-couchdb
|
||||||
|
count: 1
|
||||||
|
|
||||||
|
# Environment-specific patches
|
||||||
|
patches:
|
||||||
|
# Resource limits
|
||||||
|
- target:
|
||||||
|
kind: Deployment
|
||||||
|
name: rxminder-frontend
|
||||||
|
patch: |-
|
||||||
|
- op: replace
|
||||||
|
path: /spec/template/spec/containers/0/resources
|
||||||
|
value:
|
||||||
|
requests:
|
||||||
|
memory: "256Mi"
|
||||||
|
cpu: "100m"
|
||||||
|
limits:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "500m"
|
||||||
|
|
||||||
|
- target:
|
||||||
|
kind: StatefulSet
|
||||||
|
name: rxminder-couchdb
|
||||||
|
patch: |-
|
||||||
|
- op: replace
|
||||||
|
path: /spec/template/spec/containers/0/resources
|
||||||
|
value:
|
||||||
|
requests:
|
||||||
|
memory: "512Mi"
|
||||||
|
cpu: "200m"
|
||||||
|
limits:
|
||||||
|
memory: "1Gi"
|
||||||
|
cpu: "1000m"
|
||||||
|
|
||||||
|
# ConfigMap generation
|
||||||
|
configMapGenerator:
|
||||||
|
- name: rxminder-config
|
||||||
|
envs:
|
||||||
|
- config.env
|
||||||
|
behavior: create
|
||||||
Reference in New Issue
Block a user