# cloudnative-django **Repository Path**: divingkitten/cloudnative-django ## Basic Information - **Project Name**: cloudnative-django - **Description**: No description available - **Primary Language**: Unknown - **License**: MulanPSL-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-17 - **Last Updated**: 2024-12-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Django + celery + redis 容器化demo ## 版本信息 Python: 3.10+ Django:4.2+ Redis: 5.0+ MySQL: 8.0+ ## 项目结构 至少使用3个容器,Gunicorn容器+Celery容器+Reids容器,数据库一般使用外部提供的服务 - Gunicorn作为web容器,对外提供web服务 - whitehose插件让Gunicorn能够处理web静态资源 - celery组件定时任务进程以嵌入模式运行 ![img.png](./doc/img/img.png) ## 配置文件位置 - Django配置:mysite/settings.py - Gunicorn启动配置:mysite/gunicorn_conf.py - Celery启动配置:mysite/settings.py ## 构建镜像 ```bash docker build -f /path/to/dockerfile/Dockerfile -t mysite:latest /path/to/Dockerfile ``` ## 启动项目 ```bash docker-compose up -d ```