diff --git a/Dockerfile b/Dockerfile index e36b24a..95af1b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -85,7 +85,10 @@ EXPOSE 80 CMD ["/usr/bin/entrypoint.sh"] +# 使用 Nginx 的 Alpine 版本作为基础镜像 FROM nginx:stable-alpine as nginx + +# 替换 Alpine 的软件源为阿里云镜像 RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories # 设置工作目录 @@ -94,9 +97,11 @@ WORKDIR /usr/share/nginx/html # 设置环境变量 ENV NODE_ENV production -# 安装 envsubst 以支持环境变量替换 -RUN apk add --no-cache gettext +# 安装 envsubst 和 inotify-tools +RUN apk add --no-cache gettext inotify-tools + +# 创建 /data/uploads 目录 +RUN mkdir -p /data/uploads # 暴露 80 端口 -EXPOSE 80 - +EXPOSE 80 \ No newline at end of file diff --git a/apps/server/src/auth/auth.service.ts b/apps/server/src/auth/auth.service.ts index 40c71bb..a437b08 100755 --- a/apps/server/src/auth/auth.service.ts +++ b/apps/server/src/auth/auth.service.ts @@ -31,7 +31,7 @@ export class AuthService { return { isValid: false, error: FileValidationErrorType.INVALID_URI }; } const fileId = extractFileIdFromNginxUrl(params.originalUri); - console.log(params.originalUri, fileId); + console.log('auth', params.originalUri, fileId); const resource = await db.resource.findFirst({ where: { fileId } }); // 资源验证 @@ -170,13 +170,13 @@ export class AuthService { showname, department: deptId ? { - connect: { id: deptId }, - } + connect: { id: deptId }, + } : undefined, domain: deptId ? { - connect: { id: deptId }, - } + connect: { id: deptId }, + } : undefined, // domainId: data.deptId, meta: { diff --git a/apps/server/src/queue/models/post/utils.ts b/apps/server/src/queue/models/post/utils.ts index 4c620a2..c9d74a2 100644 --- a/apps/server/src/queue/models/post/utils.ts +++ b/apps/server/src/queue/models/post/utils.ts @@ -1,6 +1,5 @@ import { db, PostState, PostType, VisitType } from '@nice/common'; export async function updatePostViewCount(id: string, type: VisitType) { - console.log('updatePostViewCount', type); const totalViews = await db.visit.aggregate({ _sum: { views: true, diff --git a/apps/web/src/app/main/letter/write/SendCard.tsx b/apps/web/src/app/main/letter/write/SendCard.tsx index 521a14d..2e88110 100644 --- a/apps/web/src/app/main/letter/write/SendCard.tsx +++ b/apps/web/src/app/main/letter/write/SendCard.tsx @@ -42,17 +42,18 @@ export function SendCard({ staff, termId }: SendCardProps) {