| 123456789101112131415161718192021222324252627282930313233343536373839 |
- # 标注平台后端 Docker Compose 配置
- version: '3.8'
- services:
- LQLabelServer:
- image: lq_label_server:v0.01
- container_name: LQLabelServer
- restart: unless-stopped
-
- volumes:
- # 挂载代码目录(代码更新无需重新构建镜像)
- - /home/lq/lq_workspace/LQLabelServer/app/config:/app/config:rw
- # 挂载导出文件目录
- - /home/lq/lq_workspace/LQLabelServer/app/exports:/app/exports
- environment:
- - APP_ENV=test
- - TZ=Asia/Shanghai # 设置时区为上海(北京时间)
- ports:
- - "0.0.0.0:8003:8003"
- healthcheck:
- test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8003/health')"]
- interval: 30s
- timeout: 10s
- retries: 3
- start_period: 10s
- networks:
- - lq_network
-
- networks:
- lq_network:
- external: true
- # 数据卷定义
- volumes:
- backend-data:
- driver: local
|