feat: add production configuration with environment variables
- Add .env file for production deployment with reverse proxy - Add docker-compose.prod.yml for production profile - Add docker-compose.override.yml for local development - Update docker-compose.yml with all configurable variables - Update frontend to use VITE_* environment variables - Update backend to support CORS_ORIGINS and WEBHOOK_BASE_URL - Add vite.config.ts allowedHosts for reverse proxy - Add documentation for docker-compose and reverse proxy setup All URLs are now configurable via environment variables: - VITE_API_URL: Backend API endpoint - VITE_WEBHOOK_BASE_URL: Webhook base URL - VITE_INSTALL_SCRIPT_URL: Install script URL - VITE_APP_URL: Frontend URL - CORS_ORIGINS: Allowed CORS origins - WEBHOOK_BASE_URL: Backend webhook base URL
This commit is contained in:
41
.env
Normal file
41
.env
Normal file
@@ -0,0 +1,41 @@
|
||||
# LogWhispererAI - Production Environment Configuration
|
||||
# Generated for deployment with reverse proxy
|
||||
# Date: 2026-04-03
|
||||
|
||||
# ============================================
|
||||
# FRONTEND CONFIGURATION (VITE_* variables)
|
||||
# These are exposed to the browser
|
||||
# ============================================
|
||||
|
||||
# Backend API URL - HTTPS endpoint via reverse proxy
|
||||
VITE_API_URL=https://srv-logwhispererai.lab.home.lucasacchi.net
|
||||
|
||||
# Webhook base URL - public HTTPS endpoint for webhooks
|
||||
VITE_WEBHOOK_BASE_URL=https://logwhispererai.lab.home.lucasacchi.net/webhook
|
||||
|
||||
# Install script URL - public HTTPS endpoint for install script
|
||||
VITE_INSTALL_SCRIPT_URL=https://logwhispererai.lab.home.lucasacchi.net/install.sh
|
||||
|
||||
# Application identification
|
||||
VITE_APP_NAME=LogWhispererAI
|
||||
|
||||
# Application public URL - main frontend domain
|
||||
VITE_APP_URL=https://logwhispererai.lab.home.lucasacchi.net
|
||||
|
||||
# ============================================
|
||||
# BACKEND CONFIGURATION
|
||||
# ============================================
|
||||
|
||||
# CORS Origins - restrict to frontend domain for security
|
||||
# Only requests from this origin will be accepted by the backend
|
||||
CORS_ORIGINS=https://logwhispererai.lab.home.lucasacchi.net
|
||||
|
||||
# Webhook base URL - used for generating webhook URLs
|
||||
# This should match VITE_WEBHOOK_BASE_URL
|
||||
WEBHOOK_BASE_URL=https://logwhispererai.lab.home.lucasacchi.net/webhook
|
||||
|
||||
# API delay simulation (milliseconds) - simulates AI processing time
|
||||
DELAY_MS=1500
|
||||
|
||||
# Node environment
|
||||
NODE_ENV=production
|
||||
Reference in New Issue
Block a user