加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.sqlite.yml 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
version: '3.8'
services:
web:
build: .
command: /entrypoint.sh
volumes:
- .:/opt/idcops
- config:/opt/idcops/config
- static:/opt/idcops/static
- media:/opt/idcops/media
- logs:/opt/idcops/logs
- data:/opt/idcops/data
- run:/opt/idcops/run # 确保挂载 run 目录
- cache:/opt/idcops/cache # 挂载 cache 目录
depends_on:
- redis
env_file:
- ./config/.env
environment:
- MYSQL_HOST=db
- REDIS_SERVER_URL=redis://redis:6379
ports:
- "8000:8000"
redis:
image: redis:7.2.0-alpine
ports:
- "6379:6379"
volumes:
- redis_data:/data
env_file:
- ./config/.env
nginx:
image: nginx:alpine
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf # 挂载 Nginx 配置文件
- static:/opt/idcops/static # 挂载静态文件
- media:/opt/idcops/media # 挂载媒体文件
- run:/opt/idcops/run # 确保挂载 run 目录
- cache:/opt/idcops/cache # 挂载 cache 目录
ports:
- "80:80" # 映射主机的 80 端口到 Nginx 容器的 80 端口
depends_on:
- web # 确保 web 服务先启动
env_file:
- ./config/.env
networks:
default:
name: idcops_network
volumes:
static:
driver: local
media:
driver: local
config:
driver: local
logs:
driver: local
data:
driver: local
redis_data:
driver: local
run:
# 添加 run 目录的卷
driver: local
cache:
# 添加 cache 目录的卷
driver: local
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化