mirror of
https://github.com/fleetbase/fleetbase.git
synced 2025-12-19 14:18:57 +00:00
This commit provides proper configuration examples for the SocketCluster WebSocket service and improves platform compatibility. Changes: - Platform: Add linux/amd64 platform specification for Apple Silicon compatibility - CORS: Remove hardcoded permissive origins and add secure configuration examples - Examples: Create docker-compose.override.yml.example with proper WebSocket origins The configuration now supports: - Development: localhost-only origins (http/https/ws/wss protocols) - Production: Domain-specific origins with WebSocket protocol support - Security: Prevents unauthorized cross-origin WebSocket connections Updated documentation explains how to configure WebSocket origins securely for different deployment environments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
25 lines
1.1 KiB
Plaintext
25 lines
1.1 KiB
Plaintext
# Docker Compose Override Example
|
|
# Copy this file to docker-compose.override.yml and customize for your environment
|
|
|
|
version: "3.8"
|
|
services:
|
|
application:
|
|
environment:
|
|
CONSOLE_HOST: http://localhost:4200
|
|
# Add your environment-specific variables here
|
|
MAIL_MAILER: smtp # or ses, mailgun, postmark, sendgrid
|
|
OSRM_HOST: https://router.project-osrm.org
|
|
# IPINFO_API_KEY: your_api_key
|
|
# GOOGLE_MAPS_API_KEY: your_api_key
|
|
# GOOGLE_MAPS_LOCALE: us
|
|
# TWILIO_SID: your_twilio_sid
|
|
# TWILIO_TOKEN: your_twilio_token
|
|
# TWILIO_FROM: your_twilio_phone
|
|
|
|
socket:
|
|
environment:
|
|
# DEVELOPMENT: Allow localhost connections (HTTP, HTTPS, and WebSocket protocols)
|
|
SOCKETCLUSTER_OPTIONS: '{"origins":"http://localhost:*,https://localhost:*,ws://localhost:*,wss://localhost:*"}'
|
|
|
|
# PRODUCTION: Replace with your actual domain(s) - include all protocols
|
|
# SOCKETCLUSTER_OPTIONS: '{"origins":"https://yourdomain.com:*,wss://yourdomain.com:*,https://app.yourdomain.com:*,wss://app.yourdomain.com:*"}' |