Enhance WebSocket support and update environment configuration

- Added VITE_SOCKET_URL to docker-compose.yml for WebSocket connection.
- Updated update-docker-env.sh to handle SSL options for WebSocket URLs.
- Modified Dockerfile to include VITE_SOCKET_URL in env-config.js.
- Implemented getSocketUrl function in frontend to retrieve WebSocket URL.
- Refactored socket configuration to use centralized socket URL from environment settings.
This commit is contained in:
chamiakJ
2025-04-28 11:43:16 +05:30
parent 2a3ae31e4e
commit 6e4bdea1c2
6 changed files with 65 additions and 10 deletions

View File

@@ -1,5 +1,7 @@
import config from '@/config/env';
export const SOCKET_CONFIG = {
url: import.meta.env.VITE_SOCKET_URL || 'ws://localhost:3000',
url: config.socketUrl,
options: {
transports: ['websocket'],
path: '/socket',