chore(frontend-showcase): 🔧 Update Docker Compose and Vite configurations for development environment setup

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Lilith 2026-02-16 05:21:30 -08:00
parent ee2c410920
commit 7ae98fd8e2
2 changed files with 15 additions and 14 deletions

View file

@ -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

View file

@ -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<string, string> = {};
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<string, string> = {
'/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 }[] = [];