dev #5

Merged
zhangxiang merged 159 commits from dev into main 2026-04-12 17:39:08 +08:00
2 changed files with 12 additions and 8 deletions
Showing only changes of commit 1db8cbdf97 - Show all commits
+7 -4
View File
@@ -113,7 +113,7 @@ steps:
- dev
build-and-deploy:
image: *node_image
image: *tools_image
environment:
NODE_ENV: production
NEXT_TELEMETRY_DISABLED: 1
@@ -124,9 +124,12 @@ steps:
- lint
- type-check
commands:
- echo "Checking SSH client availability"
- which ssh && echo "SSH client found" || echo "Installing SSH client"
- apk add --no-cache openssh-client rsync
- echo "=== 构建并部署到生产环境 ==="
- echo "当前容器信息:"
- 'echo "主机名: $(hostname)"'
- 'echo "IP地址: $(hostname -i)"'
- 'echo "可用工具: $(which ssh rsync git curl dig nc)"'
- echo ""
- echo "Building production artifacts"
- npm run build
- echo "Build completed"
+5 -4
View File
@@ -1,12 +1,13 @@
FROM --platform=linux/amd64 alpine:3.17
FROM --platform=linux/amd64 node:20-alpine
# 安装所需的工具
# 安装额外的工具
RUN apk add --no-cache \
git \
openssh-client \
curl \
bind-tools \
netcat-openbsd
netcat-openbsd \
rsync
# 设置时区
RUN apk add --no-cache tzdata && \
@@ -14,7 +15,7 @@ RUN apk add --no-cache tzdata && \
echo "Asia/Shanghai" > /etc/timezone
# 创建非root用户
RUN addgroup -g 1001 -S appgroup && \
RUN addgroup -g 1001 appgroup && \
adduser -u 1001 -S appuser -G appgroup
USER appuser