Skip to content

Commit 7435f2f

Browse files
authored
Merge pull request #1 from droq-ai/ahmed/chore/update-tempalte
chore: Update node.json
2 parents b5b2848 + 3b836d2 commit 7435f2f

File tree

12 files changed

+2348
-148
lines changed

12 files changed

+2348
-148
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@ jobs:
2828
# Create virtual environment
2929
uv venv
3030
source .venv/bin/activate
31-
# Install dependencies without editable package (workaround for hatchling issue)
32-
uv pip install nats-py aiohttp
31+
# Install the package in development mode
32+
uv pip install -e .
33+
# Install development dependencies
3334
uv pip install pytest pytest-asyncio black ruff mypy
3435
# Set PYTHONPATH for imports
3536
echo "PYTHONPATH=src" >> $GITHUB_ENV
@@ -69,12 +70,19 @@ jobs:
6970
run: |
7071
source .venv/bin/activate
7172
black --check src/ tests/
72-
73+
7374
- name: Lint
7475
run: |
7576
source .venv/bin/activate
7677
ruff check src/ tests/
7778
79+
- name: Verify components
80+
run: |
81+
# Make the verification script executable
82+
chmod +x scripts/verify-components.sh
83+
# Run component verification to ensure node.json is valid
84+
./scripts/verify-components.sh
85+
7886
docker:
7987
runs-on: ubuntu-latest
8088

Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# syntax=docker/dockerfile:1
22
# Dockerfile for Langflow Executor Node
3-
# Build from repo root: docker build -f node/Dockerfile -t langflow-executor-node .
4-
# OR build from node directory: docker build -f Dockerfile -t langflow-executor-node ../
3+
# Build from repo root: docker build -f Dockerfile -t droq-node-template:test .
54

65
################################
76
# BUILDER STAGE
@@ -28,20 +27,19 @@ ENV UV_COMPILE_BYTECODE=1
2827
ENV UV_LINK_MODE=copy
2928

3029
# Copy Langflow dependency files first (for better caching)
31-
# These paths work when building from repo root
32-
COPY app/src/lfx/pyproject.toml /app/src/lfx/pyproject.toml
33-
COPY app/src/lfx/README.md /app/src/lfx/README.md
30+
COPY lfx/pyproject.toml /app/lfx/pyproject.toml
31+
COPY lfx/README.md /app/lfx/README.md
3432

3533
# Copy executor node dependency files
36-
COPY node/pyproject.toml /app/node/pyproject.toml
34+
COPY pyproject.toml /app/node/pyproject.toml
3735

3836
# Copy Langflow source (needed for installation)
39-
COPY app/src/lfx/src /app/src/lfx/src
37+
COPY lfx/src /app/lfx/src
4038

4139
# Install Langflow (lfx) package with all dependencies
4240
# This installs lfx and all its dependencies from pyproject.toml
4341
RUN --mount=type=cache,target=/root/.cache/uv \
44-
cd /app/src/lfx && \
42+
cd /app/lfx && \
4543
uv pip install --system --no-cache -e .
4644

4745
# Install common Langchain integration packages needed by components
@@ -69,10 +67,10 @@ RUN --mount=type=cache,target=/root/.cache/uv \
6967
python-dotenv
7068

7169
# Copy executor node source
72-
COPY node/src /app/node/src
70+
COPY src/node /app/node/src
7371

7472
# Copy components.json mapping file
75-
COPY node/components.json /app/components.json
73+
COPY components.json /app/components.json
7674

7775
################################
7876
# RUNTIME STAGE
@@ -100,7 +98,7 @@ COPY --from=builder /usr/local/bin /usr/local/bin
10098

10199
# Copy application code
102100
COPY --from=builder --chown=executor:root /app/node/src /app/src
103-
COPY --from=builder --chown=executor:root /app/src/lfx/src /app/src/lfx/src
101+
COPY --from=builder --chown=executor:root /app/lfx/src /app/src/lfx/src
104102
COPY --from=builder --chown=executor:root /app/components.json /app/components.json
105103

106104
# Set environment variables
@@ -122,3 +120,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
122120

123121
# Run the executor node
124122
CMD ["python", "-m", "uvicorn", "node.api:app", "--host", "0.0.0.0", "--port", "8000"]
123+

README.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,7 @@ This script will:
2525
cd node
2626
uv sync
2727

28-
# 2. Install Langflow dependencies (if needed)
29-
uv pip install -e ../app/src/lfx
30-
31-
# 3. Run the executor
28+
# 2. Run the executor
3229
PYTHONPATH=src python -m node.main
3330
# or with auto-reload (default in start-local.sh)
3431
RELOAD=true PYTHONPATH=src python -m node.main
@@ -135,7 +132,7 @@ docker build -f node/Dockerfile -t langflow-executor-node:latest .
135132
```
136133

137134
This allows the Dockerfile to access both:
138-
- `app/src/lfx/` - Langflow source code
135+
- `app/src/node/` - Node source code
139136
- `node/` - Executor node source code
140137

141138
## Next Steps

0 commit comments

Comments
 (0)