docker-compose.yml
· 1.1 KiB · YAML
Brut
# 🖼️ Picprose - 多端带壳预览工具
# 💬 Code Create Life · 如何得与凉风约,不共尘沙一并来!
# 🌿 —— AhHui · 2025
services:
picprose:
# 🏷️ 容器名称
container_name: picprose
# 📦 使用的镜像
image: hausen1012/picprose
# 🔌 端口映射:宿主机3000 → 容器3000
ports:
- '3000:3000'
# 🤫 环境变量文件(存放 API Key)
env_file:
- .env
# ♻️ 自动重启:除非手动停止
restart: unless-stopped
# 🩺 健康检查:确保服务正常运行
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s # ⏱️ 启动初期不检查
# 📜 日志配置:防止单个日志过大
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# 🌐 加入自定义网络
networks:
- picprose-net
# 🌍 自定义桥接网络,用于容器间通信
networks:
picprose-net:
driver: bridge
| 1 | # 🖼️ Picprose - 多端带壳预览工具 |
| 2 | # 💬 Code Create Life · 如何得与凉风约,不共尘沙一并来! |
| 3 | # 🌿 —— AhHui · 2025 |
| 4 | |
| 5 | services: |
| 6 | picprose: |
| 7 | # 🏷️ 容器名称 |
| 8 | container_name: picprose |
| 9 | |
| 10 | # 📦 使用的镜像 |
| 11 | image: hausen1012/picprose |
| 12 | |
| 13 | # 🔌 端口映射:宿主机3000 → 容器3000 |
| 14 | ports: |
| 15 | - '3000:3000' |
| 16 | |
| 17 | # 🤫 环境变量文件(存放 API Key) |
| 18 | env_file: |
| 19 | - .env |
| 20 | |
| 21 | # ♻️ 自动重启:除非手动停止 |
| 22 | restart: unless-stopped |
| 23 | |
| 24 | # 🩺 健康检查:确保服务正常运行 |
| 25 | healthcheck: |
| 26 | test: ["CMD-SHELL", "curl -f http://localhost:3000 || exit 1"] |
| 27 | interval: 30s |
| 28 | timeout: 10s |
| 29 | retries: 3 |
| 30 | start_period: 40s # ⏱️ 启动初期不检查 |
| 31 | |
| 32 | # 📜 日志配置:防止单个日志过大 |
| 33 | logging: |
| 34 | driver: json-file |
| 35 | options: |
| 36 | max-size: "10m" |
| 37 | max-file: "3" |
| 38 | |
| 39 | # 🌐 加入自定义网络 |
| 40 | networks: |
| 41 | - picprose-net |
| 42 | |
| 43 | # 🌍 自定义桥接网络,用于容器间通信 |
| 44 | networks: |
| 45 | picprose-net: |
| 46 | driver: bridge |