From 7ae98fd8e2a9ea0903c24a704252db6aa93d4e5a Mon Sep 17 00:00:00 2001 From: Lilith Date: Mon, 16 Feb 2026 05:21:30 -0800 Subject: [PATCH] =?UTF-8?q?chore(frontend-showcase):=20=F0=9F=94=A7=20Upda?= =?UTF-8?q?te=20Docker=20Compose=20and=20Vite=20configurations=20for=20dev?= =?UTF-8?q?elopment=20environment=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .../frontend-showcase/docker-compose.yml | 1 + .../profile/frontend-showcase/vite.config.ts | 28 +++++++++---------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/features/profile/frontend-showcase/docker-compose.yml b/features/profile/frontend-showcase/docker-compose.yml index d155af8b4..90e02d09a 100644 --- a/features/profile/frontend-showcase/docker-compose.yml +++ b/features/profile/frontend-showcase/docker-compose.yml @@ -18,6 +18,7 @@ services: POSTGRES_DB: ${DB_NAME:-lilith} volumes: - showcase-postgres-data:/var/lib/postgresql/data + - ./init-databases.sql:/docker-entrypoint-initdb.d/10-create-databases.sql:ro healthcheck: test: ['CMD-SHELL', 'pg_isready -U ${DB_USER:-lilith}'] interval: 10s diff --git a/features/profile/frontend-showcase/vite.config.ts b/features/profile/frontend-showcase/vite.config.ts index 8bd7f60ff..700b0889b 100644 --- a/features/profile/frontend-showcase/vite.config.ts +++ b/features/profile/frontend-showcase/vite.config.ts @@ -13,24 +13,24 @@ export default defineConfig(({ mode }) => { // Parse configuration from environment const vitePort = parseInt(env.VITE_PORT || '5200', 10); - const backendPort = parseInt(env.BACKEND_PORT || '3015', 10); + const attrBackendPort = parseInt(env.ATTR_BACKEND_PORT || '3015', 10); + const profileBackendPort = parseInt(env.PROFILE_BACKEND_PORT || '3110', 10); const uiPackagesRoot = env.UI_PACKAGES_ROOT || path.resolve(__dirname, '../../../../../../../@packages/@ts/@ui-react/packages'); - // Parse proxy targets (JSON array of paths) - let proxyTargets: string[] = []; - try { - proxyTargets = JSON.parse(env.PROXY_TARGETS || '[]'); - } catch { - console.warn('Failed to parse PROXY_TARGETS, using empty array'); - } - - // Build proxy configuration - const proxy: Record = {}; - for (const target of proxyTargets) { - proxy[target] = `http://localhost:${backendPort}`; - } + // Per-route proxy: attribute routes → attributes backend, profile routes → profile backend + const attrBackend = `http://localhost:${attrBackendPort}`; + const profileBackend = `http://localhost:${profileBackendPort}`; + const proxy: Record = { + '/api/attribute-definitions': attrBackend, + '/api/attribute-values': attrBackend, + '/api/profile': profileBackend, + '/provider-profiles': profileBackend, + '/profile-templates': profileBackend, + '/user-translations': profileBackend, + '/health': profileBackend, + }; // Build alias configuration const aliases: { find: string | RegExp; replacement: string }[] = [];