Resolved multiple issues preventing the 'competitor-analysis' app from running and serving its frontend:
1. **Fixed Python SyntaxError in Prompts:** Corrected unterminated string literals and ensure proper multi-line string formatting (using .format() instead of f-strings for complex prompts) in .
2. **Addressed Python SDK Compatibility (google-generativeai==0.3.0):**
* Removed for and by adapting the orchestrator to pass JSON schemas as direct Python dictionaries, as required by the older SDK version.
* Updated with detailed guidance on handling / imports and dictionary-based schema definitions for older SDKs.
3. **Corrected Frontend Build Dependencies:** Moved critical build dependencies (like , , ) from to in .
* Updated to include this pitfall, ensuring frontend build tools are installed in Docker.
4. **Updated Documentation:**
* : Added comprehensive lessons learned regarding dependencies, Python SDK versioning (specifically and imports for ), and robust multi-line prompt handling.
* : Integrated specific details of the encountered errors and their solutions, making the migration report a more complete historical record and guide.
These changes collectively fix the 404 error by ensuring the Python backend starts correctly and serves the frontend assets after a successful build.
107 lines
3.3 KiB
Plaintext
107 lines
3.3 KiB
Plaintext
events {
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
include mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr;
|
|
|
|
# Increase Body Size Limit for Large Payloads (Knowledge Base + Audits)
|
|
client_max_body_size 50M;
|
|
|
|
# Increase Timeouts for Long-Running AI Tasks
|
|
proxy_read_timeout 1200s;
|
|
proxy_connect_timeout 1200s;
|
|
proxy_send_timeout 1200s;
|
|
send_timeout 1200s;
|
|
|
|
# Resolver ist wichtig für Docker
|
|
resolver 127.0.0.11 valid=30s ipv6=off;
|
|
|
|
server {
|
|
listen 80;
|
|
|
|
# Basic Auth wieder aktiviert
|
|
auth_basic "Restricted Access - Local AI Suite";
|
|
auth_basic_user_file /etc/nginx/.htpasswd;
|
|
|
|
location / {
|
|
proxy_pass http://dashboard:80;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
}
|
|
|
|
location /b2b/ {
|
|
# Der Trailing Slash am Ende ist wichtig!
|
|
proxy_pass http://b2b-app:3002/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Explicit timeouts for this location
|
|
proxy_read_timeout 1200s;
|
|
proxy_connect_timeout 1200s;
|
|
proxy_send_timeout 1200s;
|
|
}
|
|
|
|
location /market/ {
|
|
# Der Trailing Slash am Ende ist wichtig!
|
|
proxy_pass http://market-frontend:80/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Explicit timeouts for this location
|
|
proxy_read_timeout 1200s;
|
|
proxy_connect_timeout 1200s;
|
|
proxy_send_timeout 1200s;
|
|
}
|
|
|
|
location /gtm/ {
|
|
# Der Trailing Slash am Ende ist wichtig!
|
|
proxy_pass http://gtm-app:3005/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Explicit timeouts for this location
|
|
proxy_read_timeout 1200s;
|
|
proxy_connect_timeout 1200s;
|
|
proxy_send_timeout 1200s;
|
|
}
|
|
|
|
location /ce/ {
|
|
# Company Explorer (Robotics Edition)
|
|
# Der Trailing Slash am Ende ist wichtig!
|
|
proxy_pass http://company-explorer:8000/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Explicit timeouts
|
|
proxy_read_timeout 1200s;
|
|
proxy_connect_timeout 1200s;
|
|
proxy_send_timeout 1200s;
|
|
}
|
|
|
|
location /ca/ {
|
|
# Competitor Analysis Agent
|
|
# Der Trailing Slash am Ende ist wichtig!
|
|
proxy_pass http://competitor-analysis:8000/;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection "upgrade";
|
|
|
|
# Explicit timeouts
|
|
proxy_read_timeout 1200s;
|
|
proxy_connect_timeout 1200s;
|
|
proxy_send_timeout 1200s;
|
|
}
|
|
}
|
|
}
|