Commit Graph

9 Commits

Author SHA1 Message Date
a40bfa61b6 Merge pull request 'fix/login-redirect-URL' (#439) from fix/login-redirect-URL into development
Reviewed-on: ADUANASOFT/anexo76#439
2026-05-22 14:24:02 +00:00
4da360e141 fix(deploy): corregir vars de producción que causaban localhost en KC URLs
docker-compose.prod.yml:
- Agrega SITE_URL=https://anexo76-dev.aduanasoft.com hardcodeado (no depende
  del .env raíz). resolveSystemBaseUrl() lo usa como fallback cuando
  ORIGIN tiene un valor localhost que pisó el default del compose.
- Agrega VITE_HUB_URL=https://workspace.aduanasoft.com para que
  getWorkspaceBaseUrl() no dependa de VITE_HUB_URL del .env raíz dev.
- Documenta el problema: root .env con ORIGIN=localhost pisa el default.

Dockerfile.prod:
- Agrega ARG/ENV VITE_KEYCLOAK_REALM (faltaba en los build-args de Jenkins).
- Agrega ARG/ENV VITE_HUB_URL con default workspace.aduanasoft.com.

.env.example raíz:
- Agrega advertencia sobre ORIGIN, VITE_HUB_URL y APP_PUBLIC_URL con
  instrucciones explícitas de cómo corregirlos en producción.
- Extrae estos valores al bloque documentado para que sean visibles.

Root cause: el deploy en producción ejecuta
  docker compose -f docker-compose.prod.yml up
  que carga automáticamente el .env raíz con ORIGIN=http://localhost:5173,
  pisando el default correcto del prod compose.
  url.origin en SvelteKit = localhost:5173 → redirect_uri con localhost.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 08:58:29 -05:00
6ce3bccf85 refactor(docker): remove Keycloak and PostgreSQL services from production configuration
- Deleted PostgreSQL and Keycloak service definitions from docker-compose.prod.yml to streamline the deployment configuration.
- Updated README.md with new build arguments for API and Keycloak URLs.
- Adjusted Dockerfile.prod to ensure proper ownership for the application directory.

This change simplifies the production setup by removing unnecessary services.
2026-05-21 17:43:25 -05:00
99cc0bc7ef revert(auth): restaurar client_id a anexo76-frontend
Anexo76 debe tener su propio cliente en Keycloak (no compartir hub-frontend).
Misma sesión SSO para el usuario, pero cliente separado por app.

El cliente anexo76-frontend debe crearse en Keycloak con:
  - Valid redirect URIs: https://anexo76-dev.aduanasoft.com/*
  - Web origins: https://anexo76-dev.aduanasoft.com

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 16:36:43 -05:00
557f904af0 fix(auth): cambiar client_id de Keycloak de anexo76-frontend a hub-frontend
Anexo76 no es independiente del Hub/Workspace — comparten el mismo
cliente de Keycloak (hub-frontend). anexo76-frontend no existe en KC.

- Dockerfile.prod: agrega ARG/ENV VITE_KEYCLOAK_CLIENT_ID=hub-frontend
- workspace-auth.ts: actualiza fallback de 'anexo76-frontend' a 'hub-frontend'
- .env.example: actualiza a hub-frontend
- Jenkinsfile: pasa --build-arg VITE_KEYCLOAK_CLIENT_ID=hub-frontend al build

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-20 15:49:28 -05:00
9d63b000bc Refactor Docker entrypoints and remove unused scripts
- Removed custom entrypoint scripts for backend, frontend, and PostgreSQL services from docker-compose files.
- Added a new entrypoint script in the backend and frontend Dockerfiles to handle initialization without relying on host-mounted scripts.
- Updated Dockerfiles to ensure proper permissions for the new entrypoint scripts.
- Enhanced database initialization logic by moving schema and extension creation to the Alembic migration script.
2026-04-24 12:53:11 -05:00
AlexeerCT
97b3ea52bc feat: Update environment variables and Docker configurations for production setup 2025-12-31 10:37:23 -06:00
AlexeerCT
69bf0c472b Refactor middleware import path, update Docker configurations, and normalize API base URL 2025-12-26 14:21:00 -06:00
AlexeerCT
ae1cf83491 Add production setup and update Docker configurations
- Introduced a new docker-compose.prod.yml for production deployment.
- Updated docker-compose.yml to change backend port mapping.
- Added svelte-sonner dependency to frontend package.json.
- Created Dockerfile.prod for building the frontend application.
- Enhanced README.md with production deployment instructions.
2025-12-26 09:48:39 -06:00