Add docker compose for dev
This commit is contained in:
14
README.md
14
README.md
@@ -18,3 +18,17 @@ cd Frontend
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## Run (Docker Compose)
|
||||
|
||||
Prereqs: Docker Desktop (compose v2).
|
||||
|
||||
```bash
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
Open: `http://localhost:3000/`
|
||||
|
||||
Notes:
|
||||
- DB is SQLite persisted in a named volume (`clientsflow_data`).
|
||||
- For LangGraph agent: set `OPENAI_API_KEY` (otherwise it falls back to the rule-based agent).
|
||||
|
||||
37
compose.yaml
Normal file
37
compose.yaml
Normal file
@@ -0,0 +1,37 @@
|
||||
services:
|
||||
frontend:
|
||||
image: node:22-bookworm-slim
|
||||
working_dir: /app/Frontend
|
||||
volumes:
|
||||
- .:/app
|
||||
- clientsflow_data:/app/.data
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
DATABASE_URL: "file:../../.data/clientsflow-dev.db"
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
CF_AGENT_MODE: "langgraph"
|
||||
OPENAI_MODEL: "gpt-4o-mini"
|
||||
# Set this in your shell or a compose override:
|
||||
# OPENAI_API_KEY: "..."
|
||||
command: >
|
||||
bash -lc "
|
||||
npm ci &&
|
||||
npx prisma db push --force-reset &&
|
||||
node prisma/seed.mjs &&
|
||||
npm run dev -- --host 0.0.0.0 --port 3000
|
||||
"
|
||||
depends_on:
|
||||
- redis
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
|
||||
volumes:
|
||||
clientsflow_data:
|
||||
redis_data:
|
||||
|
||||
Reference in New Issue
Block a user