Skip to content

Commit e08c219

Browse files
🔧 Update Docker configuration and documentation
- Updated Docker images for frontend and backend services to version 0.1.0. - Added .env and .dockerignore files to the backend directory. - Included a volume mount for the .env file in the backend service configuration. - Enhanced documentation to reflect these changes and improve clarity.
1 parent fd7e94f commit e08c219

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

docs/docs/云原生开发/容器化.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,8 @@ docker-compose 是一个用于定义和运行多容器 Docker 应用程序的工
279279
```bash showLineNumbers
280280
├── backend
281281
│ ├── Dockerfile
282+
│ ├── .env
283+
│ ├── .dockerignore
282284
│ ├── chat_routers.py
283285
│ └── requirements.txt
284286
├── frontend
@@ -300,7 +302,7 @@ services: # 定义服务
300302
build: # 使用 Dockerfile 构建镜像
301303
context: ./frontend # 前端上下文目录
302304
dockerfile: Dockerfile # Dockerfile 文件
303-
image: jiangmiemie/llmchatf:0.0.2
305+
image: jiangmiemie/llmchatf:0.1.0
304306
ports:
305307
- "8501:8501" # 映射 Streamlit 默认端口
306308
command: ["streamlit", "run", "_streamlit/streamlit_app.py"] # 启动命令
@@ -311,10 +313,12 @@ services: # 定义服务
311313
build: # 使用 Dockerfile 构建镜像
312314
context: ./backend # 后端上下文目录
313315
dockerfile: Dockerfile # 后端 Dockerfile 文件
314-
image: jiangmiemie/llmchatb:0.0.2
316+
image: jiangmiemie/llmchatb:0.1.0
315317
ports:
316318
- "8010:8010" # 映射后端服务端口
317319
command: ["python", "chat_routers.py"] # 启动后端服务的命令
320+
volumes:
321+
- ./backend/.env:/app/.env:ro # 添加 .env 文件挂载,ro表示只读
318322
```
319323
320324
@@ -398,12 +402,12 @@ docker-compose push
398402
version: '3.8'
399403
services:
400404
frontend:
401-
image: your-registry/frontend:latest
405+
image: jiangmiemie/llmchatf:0.1.0
402406
ports:
403407
- "8501:8501"
404408
405409
backend:
406-
image: your-registry/backend:latest
410+
image: jiangmiemie/llmchatb:0.1.0
407411
ports:
408412
- "8010:8010"
409413
````

0 commit comments

Comments
 (0)