diff --git a/docs/CADDY_CONFIG.md b/docs/CADDY_CONFIG.md new file mode 100644 index 0000000..ef18bdf --- /dev/null +++ b/docs/CADDY_CONFIG.md @@ -0,0 +1,32 @@ +# Caddy Config for nexusautoparts.com.mx + +## VM with Caddy: 192.168.10.74 +## VM with POS/Dashboard: 192.168.10.91 + +Add this to `/etc/caddy/Caddyfile` on the Caddy VM (192.168.10.74): + +```caddyfile +# Main POS domain +nexusautoparts.com.mx, www.nexusautoparts.com.mx { + reverse_proxy 192.168.10.91:80 +} + +# Admin dashboard subdomain +admin.nexusautoparts.com.mx { + reverse_proxy 192.168.10.91:80 +} + +# Legacy domain (optional, redirect or keep) +nexus.consultoria-as.com { + reverse_proxy 192.168.10.91:80 +} +``` + +Then reload Caddy: +```bash +sudo systemctl reload caddy +# or +sudo caddy reload --config /etc/caddy/Caddyfile +``` + +Caddy will automatically obtain Let's Encrypt certificates for all domains. diff --git a/pos/capacitor.config.json b/pos/capacitor.config.json index 14b6c35..add5e5c 100644 --- a/pos/capacitor.config.json +++ b/pos/capacitor.config.json @@ -3,7 +3,7 @@ "appName": "Nexus POS", "webDir": "www", "server": { - "url": "https://nexus.consultoria-as.com/pos", + "url": "https://nexusautoparts.com.mx/pos", "cleartext": true }, "plugins": { diff --git a/pos/config.py b/pos/config.py index 8107800..2b53f78 100644 --- a/pos/config.py +++ b/pos/config.py @@ -57,7 +57,7 @@ SMTP_HOST = os.environ.get('SMTP_HOST', 'smtp.gmail.com') SMTP_PORT = int(os.environ.get('SMTP_PORT', '587')) SMTP_USER = os.environ.get('SMTP_USER', '') SMTP_PASS = os.environ.get('SMTP_PASS', '') -SMTP_FROM = os.environ.get('SMTP_FROM', 'noreply@nexusautoparts.com') +SMTP_FROM = os.environ.get('SMTP_FROM', 'noreply@nexusautoparts.com.mx') # ─── WhatsApp Bridge ─────────────────────────────────────────────────────── WHATSAPP_BRIDGE_URL = os.environ.get('WHATSAPP_BRIDGE_URL', 'http://localhost:21465') diff --git a/pos/mobile/README.md b/pos/mobile/README.md index ceb26b2..40f8821 100644 --- a/pos/mobile/README.md +++ b/pos/mobile/README.md @@ -8,7 +8,7 @@ ## Architecture The Capacitor app loads the POS from the remote server at -`https://nexus.consultoria-as.com/pos`. This means: +`https://nexusautoparts.com.mx/pos`. This means: - The app requires internet on first load. - The PWA service worker handles offline caching after that. - No HTML/JS/CSS is bundled into the native binary.