diff --git a/services/api-gateway/.env .prod b/services/api-gateway/.env .prod new file mode 100644 index 0000000..8e7d5a5 --- /dev/null +++ b/services/api-gateway/.env .prod @@ -0,0 +1,31 @@ +# Server +NODE_ENV=development +PORT=8000 + +# Service Targets (for local gateway, Docker services) +USER_AUTH_URL=http://localhost:8011 +TEMPLATE_MANAGER_URL=http://localhost:8009 +REQUIREMENT_PROCESSOR_URL=http://localhost:8001 +TECH_STACK_SELECTOR_URL=http://localhost:8002 +ARCHITECTURE_DESIGNER_URL=http://localhost:8003 +CODE_GENERATOR_URL=http://localhost:8004 +TEST_GENERATOR_URL=http://localhost:8005 +DEPLOYMENT_MANAGER_URL=http://localhost:8006 +DASHBOARD_URL=http://localhost:8008 + +# Infrastructure +REDIS_HOST=redis +REDIS_PORT=6379 +REDIS_PASSWORD=secure_redis_password +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_DB=dev_pipeline +POSTGRES_USER=pipeline_admin +POSTGRES_PASSWORD=secure_postgres_password +RABBITMQ_HOST=rabbitmq +RABBITMQ_PORT=5672 +RABBITMQ_USER=pipeline_admin +RABBITMQ_PASSWORD=secure_rabbitmq_password + +# CORS +FRONTEND_URL=https://dashboard.codenuk.com \ No newline at end of file diff --git a/services/template-manager/src/migrations/migrate.js b/services/template-manager/src/migrations/migrate.js index d6c0a6c..db1ecef 100644 --- a/services/template-manager/src/migrations/migrate.js +++ b/services/template-manager/src/migrations/migrate.js @@ -13,7 +13,8 @@ async function runMigrations() { '002_admin_approval_workflow.sql', '003_custom_templates.sql', '004_add_is_custom_flag.sql', - '004_add_user_id_to_custom_templates.sql' + '004_add_user_id_to_custom_templates.sql', + '005_fix_custom_features_foreign_key.sql' ]; for (const migrationFile of migrationFiles) { diff --git a/services/template-manager/src/models/custom_feature.js b/services/template-manager/src/models/custom_feature.js index 85b96cc..246e76e 100644 --- a/services/template-manager/src/models/custom_feature.js +++ b/services/template-manager/src/models/custom_feature.js @@ -46,8 +46,9 @@ class CustomFeature { INSERT INTO custom_features ( id, template_id, template_type, name, description, complexity, business_rules, technical_requirements, approved, usage_count, created_by_user_session, - status, admin_notes, admin_reviewed_at, admin_reviewed_by, canonical_feature_id, similarity_score - ) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16) + status, admin_notes, admin_reviewed_at, admin_reviewed_by, canonical_feature_id, similarity_score, + created_at, updated_at + ) VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,DEFAULT,DEFAULT) RETURNING * `; const values = [