You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: clarify .env configuration for Docker Compose deployment (#858)
- Expand Docker Compose section in README.md and README_zh.md with:
- Explicit note that only root .env is used (not web/.env)
- Instructions to update NEXT_PUBLIC_API_URL for remote/LAN deployment
- Explanation that NEXT_PUBLIC_API_URL is a build-time variable
- Improve NEXT_PUBLIC_API_URL comments in root .env.example
Closes#527
### Docker Compose (include both backend and frontend)
525
525
526
-
DeerFlow provides a docker-compose setup to easily run both the backend and frontend together:
526
+
DeerFlow provides a docker-compose setup to easily run both the backend and frontend together.
527
+
528
+
#### Configuration
529
+
530
+
Before building, configure the root `.env` file (copied from `.env.example`):
531
+
532
+
```bash
533
+
cp .env.example .env
534
+
cp conf.yaml.example conf.yaml
535
+
```
536
+
537
+
> [!IMPORTANT]
538
+
> The `docker-compose.yml` only uses the **root `.env`** file (not `web/.env`). You do **not** need to create or modify `web/.env` when using Docker Compose.
539
+
540
+
If you are deploying on a **remote server** or accessing from a **LAN IP** (not `localhost`), you **must** update `NEXT_PUBLIC_API_URL` in the root `.env` to your actual host IP or domain:
541
+
542
+
```bash
543
+
# Example: accessing from LAN IP
544
+
NEXT_PUBLIC_API_URL=http://192.168.1.100:8000/api
545
+
546
+
# Example: remote deployment with domain
547
+
NEXT_PUBLIC_API_URL=https://your-domain.com/api
548
+
```
549
+
550
+
> [!NOTE]
551
+
> `NEXT_PUBLIC_API_URL` is a **build-time** variable for Next.js — it gets embedded into the frontend JavaScript bundle during `docker compose build`. If you change this value later, you must rebuild with `docker compose build` for the change to take effect.
552
+
553
+
#### Build and Run
527
554
528
555
```bash
529
556
# building docker image
@@ -534,7 +561,7 @@ docker compose up
534
561
```
535
562
536
563
> [!WARNING]
537
-
> If you want to deploy the deer flow into production environments, please add authentication to the website and evaluate your security check of the MCPServer and Python Repl.
564
+
> If you want to deploy the deer flow into production environments, please add authentication to the website and evaluate your security check of the MCPServer and Python Repl.
0 commit comments