新建docker-compose.yml配置文件,内容如下:
services:
# NodePass 应用 - 使用GitHub发布的镜像
nodepassdash:
image: ghcr.io/nodepassproject/nodepassdash:latest
container_name: nodepassdash
# network_mode: "host" # 如需要ipv6,可考虑使用host模式
ports:
- "3000:3000" # 整合的Next.js应用
volumes:
# 挂载配置和日志
- ./config:/app/config:ro
# SQLite 数据库文件
- ./public:/app/public
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 5
start_period: 60s