feat: configure official domain drip-zone.online and email info@drip-zone.online across web and native app
This commit is contained in:
parent
0d9cb0db6e
commit
0f74821c94
@ -23,18 +23,10 @@ object ApiClient {
|
|||||||
private const val TAG = "DripApiClient"
|
private const val TAG = "DripApiClient"
|
||||||
private const val CACHE_KEY_PRODUCTS = "cached_products_json"
|
private const val CACHE_KEY_PRODUCTS = "cached_products_json"
|
||||||
|
|
||||||
fun getBaseUrl(): String {
|
const val PRIMARY_BASE_URL = "https://drip-zone.online"
|
||||||
return try {
|
const val FALLBACK_BASE_URL = "https://dripzone.almeira.com.co"
|
||||||
val addr = java.net.InetAddress.getByName("drip-zone.online")
|
|
||||||
if (addr != null && !addr.hostAddress.isNullOrBlank()) {
|
fun getBaseUrl(): String = PRIMARY_BASE_URL
|
||||||
"https://drip-zone.online"
|
|
||||||
} else {
|
|
||||||
"https://dripzone.almeira.com.co"
|
|
||||||
}
|
|
||||||
} catch (e: Exception) {
|
|
||||||
"https://dripzone.almeira.com.co"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getPrimaryProductsUrl(): String = "${getBaseUrl()}/api/products"
|
private fun getPrimaryProductsUrl(): String = "${getBaseUrl()}/api/products"
|
||||||
private const val FALLBACK_URL = "https://news.almeira.com.co/api/products"
|
private const val FALLBACK_URL = "https://news.almeira.com.co/api/products"
|
||||||
@ -183,7 +175,7 @@ object ApiClient {
|
|||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
val request = Request.Builder()
|
val request = Request.Builder()
|
||||||
.url("https://dripzone.almeira.com.co/api/cities")
|
.url("${getBaseUrl()}/api/cities")
|
||||||
.header("Accept", "application/json")
|
.header("Accept", "application/json")
|
||||||
.build()
|
.build()
|
||||||
val response = client.newCall(request).execute()
|
val response = client.newCall(request).execute()
|
||||||
|
|||||||
@ -112,7 +112,7 @@ class OrderVerificationBottomSheet : BottomSheetDialogFragment() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
binding.btnOpenWhatsAppChat.setOnClickListener {
|
binding.btnOpenWhatsAppChat.setOnClickListener {
|
||||||
val message = "¡Hola Carlos! Acabo de registrar mi pedido en la app oficial de DripZone con la orden *$createdOrderId*. ¿Me confirmas la programación del despacho contraentrega a ${selectedCity.name}?"
|
val message = "¡Hola DripZone! Acabo de registrar mi pedido en la app oficial con la orden *$createdOrderId*. ¿Me confirman la programación del despacho contraentrega a ${selectedCity.name}?"
|
||||||
SecurityManager.openWhatsApp(
|
SecurityManager.openWhatsApp(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
SecurityManager.WHATSAPP_STORE_PHONE,
|
SecurityManager.WHATSAPP_STORE_PHONE,
|
||||||
|
|||||||
@ -5,7 +5,7 @@ const config: CapacitorConfig = {
|
|||||||
appName: 'DripZone',
|
appName: 'DripZone',
|
||||||
webDir: 'public',
|
webDir: 'public',
|
||||||
server: {
|
server: {
|
||||||
url: 'https://dripzone.almeira.com.co',
|
url: 'https://drip-zone.online',
|
||||||
cleartext: true,
|
cleartext: true,
|
||||||
androidScheme: 'https',
|
androidScheme: 'https',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -203,7 +203,7 @@ export async function POST(request: Request) {
|
|||||||
|
|
||||||
// Construcción de la URL de streaming en Alta Definición Full HD
|
// Construcción de la URL de streaming en Alta Definición Full HD
|
||||||
const relativeImageUrl = `/api/whatsapp-media?id=${encodeURIComponent(whatsappMessageId)}&remoteJid=${encodeURIComponent(remoteJid)}`;
|
const relativeImageUrl = `/api/whatsapp-media?id=${encodeURIComponent(whatsappMessageId)}&remoteJid=${encodeURIComponent(remoteJid)}`;
|
||||||
const fullMediaUrl = `https://dripzone.almeira.com.co/api/whatsapp-media?id=${encodeURIComponent(whatsappMessageId)}&remoteJid=${encodeURIComponent(remoteJid)}`;
|
const fullMediaUrl = `https://drip-zone.online/api/whatsapp-media?id=${encodeURIComponent(whatsappMessageId)}&remoteJid=${encodeURIComponent(remoteJid)}`;
|
||||||
|
|
||||||
// 6. CREACIÓN Y PUBLICACIÓN DEL PRODUCTO EN LA APP Y CATÁLOGO
|
// 6. CREACIÓN Y PUBLICACIÓN DEL PRODUCTO EN LA APP Y CATÁLOGO
|
||||||
const newProduct: Product = {
|
const newProduct: Product = {
|
||||||
|
|||||||
@ -127,7 +127,7 @@ export const BRANDS: Record<BrandId, BrandTheme> = {
|
|||||||
tagline: 'Ropa urbana y zapatillas deportivas',
|
tagline: 'Ropa urbana y zapatillas deportivas',
|
||||||
badge: 'Edición Limitada',
|
badge: 'Edición Limitada',
|
||||||
couponCode: 'DRIP-VIP',
|
couponCode: 'DRIP-VIP',
|
||||||
whatsappNumber: '573167455877',
|
whatsappNumber: '573106390296',
|
||||||
colors: {
|
colors: {
|
||||||
primaryGradient: 'from-purple-600 via-fuchsia-500 to-pink-600',
|
primaryGradient: 'from-purple-600 via-fuchsia-500 to-pink-600',
|
||||||
secondaryGradient: 'from-purple-500 to-pink-500',
|
secondaryGradient: 'from-purple-500 to-pink-500',
|
||||||
|
|||||||
@ -853,9 +853,9 @@ class DataService {
|
|||||||
private settings: StoreSettings = {
|
private settings: StoreSettings = {
|
||||||
storeName: 'DripZone',
|
storeName: 'DripZone',
|
||||||
slogan: 'Luxury Streetwear & Collectibles',
|
slogan: 'Luxury Streetwear & Collectibles',
|
||||||
email: 'carlos.andres.lasso@gmail.com',
|
email: 'info@drip-zone.online',
|
||||||
phone: '3167455877',
|
phone: '3106390296',
|
||||||
whatsappNumber: '573167455877',
|
whatsappNumber: '573106390296',
|
||||||
instagramHandle: '@dripzone.co',
|
instagramHandle: '@dripzone.co',
|
||||||
address: 'Bodega Central / Cali',
|
address: 'Bodega Central / Cali',
|
||||||
city: 'Cali, Colombia',
|
city: 'Cali, Colombia',
|
||||||
|
|||||||
@ -133,7 +133,7 @@ export async function notifyNewProductPublished(
|
|||||||
`📏 *Tallas Disponibles:* ${sizesText}\n` +
|
`📏 *Tallas Disponibles:* ${sizesText}\n` +
|
||||||
`📍 *Grupo Proveedor:* ${sourceGroup || 'Canal Mayorista'}\n\n` +
|
`📍 *Grupo Proveedor:* ${sourceGroup || 'Canal Mayorista'}\n\n` +
|
||||||
`🌐 *Ver en la Tienda Web:*\n` +
|
`🌐 *Ver en la Tienda Web:*\n` +
|
||||||
`👉 https://dripzone.almeira.com.co\n\n` +
|
`👉 https://drip-zone.online\n\n` +
|
||||||
`📱 *Disponible de inmediato en la aplicación móvil DripZone para todos los clientes.*\n` +
|
`📱 *Disponible de inmediato en la aplicación móvil DripZone para todos los clientes.*\n` +
|
||||||
`━━━━━━━━━━━━━━━━━━━━━━`
|
`━━━━━━━━━━━━━━━━━━━━━━`
|
||||||
);
|
);
|
||||||
@ -145,12 +145,12 @@ export async function notifyNewProductPublished(
|
|||||||
if (rawImg.startsWith('http://') || rawImg.startsWith('https://')) {
|
if (rawImg.startsWith('http://') || rawImg.startsWith('https://')) {
|
||||||
resolvedMediaUrl = rawImg;
|
resolvedMediaUrl = rawImg;
|
||||||
} else if (rawImg.startsWith('/')) {
|
} else if (rawImg.startsWith('/')) {
|
||||||
resolvedMediaUrl = `https://dripzone.almeira.com.co${rawImg}`;
|
resolvedMediaUrl = `https://drip-zone.online${rawImg}`;
|
||||||
} else {
|
} else {
|
||||||
resolvedMediaUrl = `https://dripzone.almeira.com.co/${rawImg}`;
|
resolvedMediaUrl = `https://drip-zone.online/${rawImg}`;
|
||||||
}
|
}
|
||||||
} else if (resolvedMediaUrl && !resolvedMediaUrl.startsWith('http')) {
|
} else if (resolvedMediaUrl && !resolvedMediaUrl.startsWith('http')) {
|
||||||
resolvedMediaUrl = `https://dripzone.almeira.com.co${resolvedMediaUrl.startsWith('/') ? '' : '/'}${resolvedMediaUrl}`;
|
resolvedMediaUrl = `https://drip-zone.online${resolvedMediaUrl.startsWith('/') ? '' : '/'}${resolvedMediaUrl}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
const dispatchedTo: string[] = [];
|
const dispatchedTo: string[] = [];
|
||||||
@ -259,7 +259,7 @@ export async function notifyAdminNewOrder(order: any): Promise<boolean> {
|
|||||||
`• *Saldo a Cobrar Contraentrega:* *${formatCOP(order.balanceDue || order.totalAmount || 0)}*\n` +
|
`• *Saldo a Cobrar Contraentrega:* *${formatCOP(order.balanceDue || order.totalAmount || 0)}*\n` +
|
||||||
`━━━━━━━━━━━━━━━━━━━━━━\n` +
|
`━━━━━━━━━━━━━━━━━━━━━━\n` +
|
||||||
`⚡ *Gestionar en el Panel de Administración:*\n` +
|
`⚡ *Gestionar en el Panel de Administración:*\n` +
|
||||||
`👉 https://dripzone.almeira.com.co/admin/pedidos`
|
`👉 https://drip-zone.online/admin/pedidos`
|
||||||
);
|
);
|
||||||
|
|
||||||
// Extraer y resolver la URL absoluta de la fotografía del calzado
|
// Extraer y resolver la URL absoluta de la fotografía del calzado
|
||||||
@ -270,9 +270,9 @@ export async function notifyAdminNewOrder(order: any): Promise<boolean> {
|
|||||||
if (rawImage.startsWith('http://') || rawImage.startsWith('https://')) {
|
if (rawImage.startsWith('http://') || rawImage.startsWith('https://')) {
|
||||||
resolvedImageUrl = rawImage;
|
resolvedImageUrl = rawImage;
|
||||||
} else if (rawImage.startsWith('/')) {
|
} else if (rawImage.startsWith('/')) {
|
||||||
resolvedImageUrl = `https://dripzone.almeira.com.co${rawImage}`;
|
resolvedImageUrl = `https://drip-zone.online${rawImage}`;
|
||||||
} else {
|
} else {
|
||||||
resolvedImageUrl = `https://dripzone.almeira.com.co/${rawImage}`;
|
resolvedImageUrl = `https://drip-zone.online/${rawImage}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,27 @@
|
|||||||
import paramiko
|
import paramiko
|
||||||
|
import sys
|
||||||
|
|
||||||
client = paramiko.SSHClient()
|
HOST = "161.97.93.156"
|
||||||
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
USER = "carlos"
|
||||||
client.connect('161.97.93.156', username='carlos', password='Innova1978+*?', timeout=20)
|
PASSWORD = "Innova1978+*?"
|
||||||
stdin, stdout, stderr = client.exec_command('docker inspect dripzone-production --format "{{.Config.WorkingDir}} - {{.Config.Cmd}}"')
|
|
||||||
print("dripzone-production cmd:", stdout.read().decode('utf-8'))
|
try:
|
||||||
stdin, stdout, stderr = client.exec_command('docker inspect bfmnoga3lb0ckomhdmxe0rco-021053217798 --format "{{.Config.WorkingDir}} - {{.Config.Cmd}}"')
|
ssh = paramiko.SSHClient()
|
||||||
print("coolify dripzone cmd:", stdout.read().decode('utf-8'))
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
client.close()
|
ssh.connect(HOST, username=USER, password=PASSWORD, timeout=10)
|
||||||
|
|
||||||
|
stdin, stdout, stderr = ssh.exec_command('docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"')
|
||||||
|
print("=== DOCKER PS ===")
|
||||||
|
print(stdout.read().decode('utf-8'))
|
||||||
|
|
||||||
|
stdin, stdout, stderr = ssh.exec_command('docker logs --tail 30 dripzone-production 2>&1')
|
||||||
|
print("=== DRIPZONE PRODUCTION LOGS ===")
|
||||||
|
print(stdout.read().decode('utf-8'))
|
||||||
|
|
||||||
|
stdin, stdout, stderr = ssh.exec_command('ps aux | grep -E "docker|build" | grep -v grep')
|
||||||
|
print("=== RUNNING BUILDS / PROCESSES ===")
|
||||||
|
print(stdout.read().decode('utf-8'))
|
||||||
|
|
||||||
|
ssh.close()
|
||||||
|
except Exception as e:
|
||||||
|
print("Error:", e)
|
||||||
|
|||||||
@ -27,9 +27,11 @@ FILES_TO_SYNC = [
|
|||||||
"src/lib/data-service.ts",
|
"src/lib/data-service.ts",
|
||||||
"src/lib/evolution-api.ts",
|
"src/lib/evolution-api.ts",
|
||||||
"src/lib/bold-service.ts",
|
"src/lib/bold-service.ts",
|
||||||
|
"src/config/brands.ts",
|
||||||
"src/app/api/bold/create-payment/route.ts",
|
"src/app/api/bold/create-payment/route.ts",
|
||||||
"src/app/api/bold/status/route.ts",
|
"src/app/api/bold/status/route.ts",
|
||||||
"src/app/api/webhook/bold/route.ts",
|
"src/app/api/webhook/bold/route.ts",
|
||||||
|
"src/app/api/webhook/whatsapp/route.ts",
|
||||||
"src/app/api/whatsapp-media/route.ts",
|
"src/app/api/whatsapp-media/route.ts",
|
||||||
"src/app/api/whatsapp-feed/route.ts",
|
"src/app/api/whatsapp-feed/route.ts",
|
||||||
"src/app/api/whatsapp-groups/route.ts",
|
"src/app/api/whatsapp-groups/route.ts",
|
||||||
@ -40,6 +42,7 @@ FILES_TO_SYNC = [
|
|||||||
"src/components/store/ProductModal.tsx",
|
"src/components/store/ProductModal.tsx",
|
||||||
"src/components/custom-requests/CustomRequestModal.tsx",
|
"src/components/custom-requests/CustomRequestModal.tsx",
|
||||||
"docker-compose.prod.yml",
|
"docker-compose.prod.yml",
|
||||||
|
"capacitor.config.ts",
|
||||||
".env.local",
|
".env.local",
|
||||||
"public/DripZone.apk",
|
"public/DripZone.apk",
|
||||||
]
|
]
|
||||||
|
|||||||
28
scripts/inspect_routing.py
Normal file
28
scripts/inspect_routing.py
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import paramiko
|
||||||
|
|
||||||
|
HOST = "161.97.93.156"
|
||||||
|
USER = "carlos"
|
||||||
|
PASSWORD = "Innova1978+*?"
|
||||||
|
|
||||||
|
ssh = paramiko.SSHClient()
|
||||||
|
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
||||||
|
ssh.connect(HOST, username=USER, password=PASSWORD, timeout=10)
|
||||||
|
|
||||||
|
# Check labels of coolify container
|
||||||
|
stdin, stdout, stderr = ssh.exec_command("docker ps --filter 'name=bfmnoga3' --format '{{.Names}}'")
|
||||||
|
coolify_c_name = stdout.read().decode('utf-8').strip()
|
||||||
|
print("Coolify container name:", coolify_c_name)
|
||||||
|
|
||||||
|
if coolify_c_name:
|
||||||
|
stdin, stdout, stderr = ssh.exec_command(f"docker inspect {coolify_c_name} --format '{{{{json .Config.Labels}}}}'")
|
||||||
|
print("Coolify labels:", stdout.read().decode('utf-8'))
|
||||||
|
|
||||||
|
# Check dripzone-production labels
|
||||||
|
stdin, stdout, stderr = ssh.exec_command("docker inspect dripzone-production --format '{{json .Config.Labels}}'")
|
||||||
|
print("\ndripzone-production labels:", stdout.read().decode('utf-8'))
|
||||||
|
|
||||||
|
# Test curl locally on the VPS
|
||||||
|
stdin, stdout, stderr = ssh.exec_command("curl -I -k -H 'Host: drip-zone.online' https://127.0.0.1:443")
|
||||||
|
print("\nCurl drip-zone.online via localhost:443:\n", stdout.read().decode('utf-8'))
|
||||||
|
|
||||||
|
ssh.close()
|
||||||
Loading…
Reference in New Issue
Block a user