diff --git a/docker-compose.yml b/docker-compose.yml index fec3d1d5..366afbbc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -244,6 +244,24 @@ services: DB_PATH: "/app/connector_queue.db" COMPANY_EXPLORER_URL: "http://company-explorer:8000" + lead-engine: + build: + context: ./lead-engine + dockerfile: Dockerfile + container_name: lead-engine + restart: unless-stopped + ports: + - "8501:8501" + env_file: + - .env + environment: + PYTHONUNBUFFERED: "1" + COMPANY_EXPLORER_URL: "http://company-explorer:8000" + volumes: + - ./lead-engine:/app + # We need to mount the root connector module so it can be imported inside the container + - ./company_explorer_connector.py:/app/company_explorer_connector.py + # --- INFRASTRUCTURE SERVICES --- duckdns: image: lscr.io/linuxserver/duckdns:latest diff --git a/lead-engine/Dockerfile b/lead-engine/Dockerfile index ed452e66..d31b8e62 100644 --- a/lead-engine/Dockerfile +++ b/lead-engine/Dockerfile @@ -4,7 +4,8 @@ WORKDIR /app COPY . . -RUN pip install streamlit pandas +# Install dependencies required for ingestion and DB +RUN pip install streamlit pandas requests python-dotenv ENV PYTHONUNBUFFERED=1 CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] diff --git a/nginx-proxy.conf b/nginx-proxy.conf index 190eed80..d7d36b87 100644 --- a/nginx-proxy.conf +++ b/nginx-proxy.conf @@ -153,8 +153,7 @@ http { location /lead/ { # Lead Engine (TradingTwins) - # Proxying external service on host - proxy_pass http://192.168.178.6:8501/; + proxy_pass http://lead-engine:8501/; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Upgrade $http_upgrade;