This document describes how to run DataGenFlow using Docker.
-
Build and start the application:
docker-compose up -d
-
Access the application:
- Frontend: http://localhost:8000
- API: http://localhost:8000/api
-
Stop the application:
docker-compose down
Custom blocks can be added to lib/blocks/custom/ on your host system. They will be automatically available after restarting the backend container:
docker-compose restart backendThe lib/blocks/custom/ directory is mounted as a volume, so you can add new block files directly from your host system without rebuilding the image.
You can configure the application using environment variables. Create a .env file in the project root:
LLM_ENDPOINT=http://localhost:11434/api/generate
LLM_API_KEY=
LLM_MODEL=llama3
DEBUG=falseThese variables are automatically passed to the container via docker-compose.yml.
The data/ directory is mounted as a volume, so your database and other data will persist between container restarts.
To rebuild the images:
docker-compose buildOr rebuild without cache:
docker-compose build --no-cacheFor development, you may want to mount additional directories or use volume mounts for live code reloading. Modify docker-compose.yml as needed.
- Backend: Python 3.11 with uv, serves both API and frontend
- Frontend: Built with yarn/vite, served as static files by the backend
- Port: 8000 (both API and frontend)
The backend Dockerfile:
- Uses multi-stage builds for optimization
- Compiles Python bytecode for faster startup
- Builds the frontend and includes it in the final image
- Serves the frontend at the root path via FastAPI