Files
mengyanote/mengyanote-backend/docker-compose.yml
2026-05-16 19:03:44 +08:00

29 lines
904 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
version: '3.8'
services:
mengyanote-backend:
build: .
container_name: mengyanote-backend
restart: unless-stopped
ports:
- "2424:8000"
volumes:
# 将主机上的「整个 data」挂到容器 /app/mengyanote内含 config/ 与 mengyanote/ 笔记子目录)时,
# main.py 会自动使用 /app/mengyanote/mengyanote 作为笔记根、/app/mengyanote/config 作为配置。
# 若只挂笔记目录本身,请挂到 /app/mengyanote 且其中直接为各分类文件夹(无嵌套 mengyanote
- ./data:/app/mengyanote
environment:
- TZ=Asia/Shanghai
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/api/tree"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- mengyanote-network
networks:
mengyanote-network:
driver: bridge