fix: 添加 docker-cli 依赖,修复 TLS 环境变量,支持容器健康检查

This commit is contained in:
aiyimickey 2026-07-02 11:34:18 +08:00
parent c876a69443
commit 1bfc2577c2
2 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,7 @@ RUN npm run build
FROM node:22-alpine AS runner FROM node:22-alpine AS runner
WORKDIR /app WORKDIR /app
ENV NODE_ENV=production ENV NODE_ENV=production
RUN apk add --no-cache sqlite RUN apk add --no-cache sqlite docker-cli
COPY --from=base /app/.next/standalone ./ COPY --from=base /app/.next/standalone ./
COPY --from=base /app/.next/static ./.next/static COPY --from=base /app/.next/static ./.next/static
COPY --from=base /app/scripts ./scripts COPY --from=base /app/scripts ./scripts

View File

@ -9,10 +9,12 @@ services:
volumes: volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
- ./data:/app/data - ./data:/app/data
env_file: .env
environment: environment:
- NODE_ENV=production - NODE_ENV=production
- DATABASE_PATH=/app/data/monitor.db - DATABASE_PATH=/app/data/monitor.db
- MONITOR_MODE=local - MONITOR_MODE=local
- NODE_TLS_REJECT_UNAUTHORIZED=0
networks: networks:
- webnet - webnet
init: true init: true