mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-03-11 04:14:38 +00:00
Add more content and fix format
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
## 11.6 使用 Django
|
||||
## 11.6 实战 Django
|
||||
|
||||
> 本小节内容适合 `Python` 开发人员阅读。
|
||||
|
||||
@@ -52,8 +52,6 @@ $ mkdir django-docker && cd django-docker
|
||||
|
||||
### 11.6.3 步骤 1:创建 Dockerfile
|
||||
|
||||
如下代码块所示,展示了相关示例:
|
||||
|
||||
```docker
|
||||
FROM python:3.12-slim
|
||||
|
||||
@@ -92,8 +90,6 @@ COPY . /code/
|
||||
|
||||
### 11.6.4 步骤 2:创建 requirements.txt
|
||||
|
||||
如下代码块所示,展示了相关示例:
|
||||
|
||||
```txt
|
||||
Django>=5.0,<6.0
|
||||
psycopg[binary]>=3.1,<4.0
|
||||
@@ -364,5 +360,5 @@ services:
|
||||
|
||||
- [Compose 模板文件详解](11.5_compose_file.md):深入理解 Compose 文件的所有配置项
|
||||
- [使用 WordPress](11.8_wordpress.md):另一个 Compose 实战案例
|
||||
- [Dockerfile 最佳实践](../appendix/20.1_best_practices.md):构建更小、更安全的镜像
|
||||
- [Dockerfile 最佳实践](../appendix/best_practices.md):构建更小、更安全的镜像
|
||||
- [数据管理](../08_data/README.md):Volume 和数据持久化详解
|
||||
|
||||
Reference in New Issue
Block a user