mirror of
https://github.com/coleam00/Archon.git
synced 2026-01-07 15:18:14 -05:00
* depends on and env var added Update Vite configuration to enable allowed hosts - Uncommented the allowedHosts configuration to allow for dynamic host settings based on environment variables. - This change enhances flexibility for different deployment environments while maintaining the default localhost and specific domain access. Needs testing to confirm proper functionality with various host configurations. rm my domain * Enhance Vite configuration with dynamic allowed hosts support - Added VITE_ALLOWED_HOSTS environment variable to .env.example and docker-compose.yml for flexible host configuration. - Updated Vite config to dynamically set allowed hosts, incorporating defaults and custom values from the environment variable. - This change improves deployment flexibility while maintaining security by defaulting to localhost and specific domains. Needs testing to confirm proper functionality with various host configurations. * refactor: remove unnecessary dependency on archon-agents in docker-compose.yml - Removed the dependency condition for archon-agents from the archon-mcp service to streamline the startup process. - This change simplifies the service configuration and reduces potential startup issues related to agent service health checks. Needs testing to ensure that the application functions correctly without the archon-agents dependency. --------- Co-authored-by: Julian Gegenhuber <office@salzkammercode.at>
This commit is contained in:
@@ -280,7 +280,16 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => {
|
||||
host: '0.0.0.0', // Listen on all network interfaces with explicit IP
|
||||
port: parseInt(process.env.ARCHON_UI_PORT || env.ARCHON_UI_PORT || '3737'), // Use configurable port
|
||||
strictPort: true, // Exit if port is in use
|
||||
allowedHosts: [env.HOST, 'localhost', '127.0.0.1'],
|
||||
allowedHosts: (() => {
|
||||
const defaultHosts = ['localhost', '127.0.0.1', '::1'];
|
||||
const customHosts = env.VITE_ALLOWED_HOSTS?.trim()
|
||||
? env.VITE_ALLOWED_HOSTS.split(',').map(h => h.trim()).filter(Boolean)
|
||||
: [];
|
||||
const hostFromEnv = (process.env.HOST ?? env.HOST) && (process.env.HOST ?? env.HOST) !== 'localhost'
|
||||
? [process.env.HOST ?? env.HOST]
|
||||
: [];
|
||||
return [...new Set([...defaultHosts, ...hostFromEnv, ...customHosts])];
|
||||
})(),
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: `http://${host}:${port}`,
|
||||
|
||||
Reference in New Issue
Block a user