feat: compose stack in devcontainer (db, langflow, lfx)

- docker-compose.yml with app/db/langflow/lfx services and healthchecks
- Dockerfile.lfx (stateless flow runtime on :6004)
- init-db.sql (langflow + test databases)
- devcontainer.json switched to compose mode with runServices
- setup.sh waits for compose services and requires .env
This commit is contained in:
Jonas Miederer 2026-09-06 22:23:30 +00:00
parent 86fe4424e7
commit 2ba062c4c5
6 changed files with 154 additions and 9 deletions

View file

@ -0,0 +1,19 @@
# Stateless Langflow flow runtime (LFX). Serves versioned flow JSON files
# deployed by our backend via POST /flows/upload/ (persisted in /flows).
# LFX stays on the internal compose network; our FastAPI is the only
# public surface and proxies run/stream calls.
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
# lfx = flow runtime; requests = convenience for custom-component code.
RUN pip install "lfx==1.12.0" requests
RUN mkdir -p /flows
VOLUME /flows
EXPOSE 6004
# Serve the /flows dir (uploaded flows persist there via --flow-dir).
# Flags verified against `lfx serve --help` (lfx 1.12.0).
CMD ["lfx", "serve", "--host", "0.0.0.0", "--port", "6004", "--flow-dir", "/flows", "/flows"]