feat: deploy en host LXC (nginx + systemd) y ajustes para mismo-origen

- deploy/nginx-host.conf: nginx del host sirve dist/ de las 4 apps y
  proxifica /api/ a 127.0.0.1:3000 (client_max_body_size 10m)
- deploy/frasa-api.service: API Gateway como servicio systemd
- landing: URLs relativas (/quote/, /client/, /pay/)
- Dockerfiles de apps: ARG VITE_API_URL=/api para builds same-origin
- docker-compose: NGINX_CONF parametrizado (nginx.http.conf sin SSL)
- README: instrucciones para host LXC y nota de DDNS pendiente
This commit is contained in:
2026-08-22 00:05:28 +00:00
parent 0fb92364d8
commit 05f6ceb01a
10 changed files with 132 additions and 19 deletions

View File

@@ -7,20 +7,19 @@ describe('MODULOS', () => {
expect(MODULOS.map((m) => m.id)).toEqual(['cotizador', 'alta-clientes', 'cobranza'])
})
it('cada módulo tiene nombre, descripción y URL de preview válida', () => {
it('cada módulo tiene nombre, descripción y URL válida', () => {
for (const modulo of MODULOS) {
expect(modulo.nombre.length).toBeGreaterThan(0)
expect(modulo.descripcion.length).toBeGreaterThan(0)
expect(() => new URL(modulo.url)).not.toThrow()
expect(new URL(modulo.url).protocol).toBe('http:')
expect(modulo.url).toMatch(/^\/[a-z]+\/$/)
}
})
it('apunta a los puertos y prefijos de preview correctos', () => {
it('apunta a los prefijos correctos (same-origin detrás de NGINX)', () => {
const urls = Object.fromEntries(MODULOS.map((m) => [m.id, m.url]))
expect(urls['cotizador']).toBe('http://192.168.10.123:3001/quote/')
expect(urls['alta-clientes']).toBe('http://192.168.10.123:3002/client/')
expect(urls['cobranza']).toBe('http://192.168.10.123:3003/pay/')
expect(urls['cotizador']).toBe('/quote/')
expect(urls['alta-clientes']).toBe('/client/')
expect(urls['cobranza']).toBe('/pay/')
})
it('no hay ids ni URLs duplicadas', () => {