feat: add public assets to Docker image and update Dify API config with new talent service agent

This commit is contained in:
root
2026-05-11 17:47:49 +08:00
parent 2336a2bd30
commit d4105fc04d
5 changed files with 33 additions and 8 deletions
+2
View File
@@ -29,6 +29,8 @@ COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static COPY --from=builder /app/.next/static ./.next/static
# 复制 prisma schema (用于数据库迁移) # 复制 prisma schema (用于数据库迁移)
COPY --from=builder /app/prisma ./prisma COPY --from=builder /app/prisma ./prisma
# 复制 public 静态文件
COPY --from=builder /app/public ./public
RUN mkdir -p /app/data && chown nextjs:nodejs /app/data RUN mkdir -p /app/data && chown nextjs:nodejs /app/data
USER nextjs USER nextjs
+2 -1
View File
@@ -6,11 +6,12 @@ services:
- "3000:3000" - "3000:3000"
extra_hosts: extra_hosts:
- "host.docker.internal:host-gateway" - "host.docker.internal:host-gateway"
- "df.clkeji.com:host-gateway"
environment: environment:
- DATABASE_URL=file:/app/data/dev.db - DATABASE_URL=file:/app/data/dev.db
- NEXTAUTH_SECRET=nextapp-secret-key-2026 - NEXTAUTH_SECRET=nextapp-secret-key-2026
- NEXTAUTH_URL=http://localhost:3000 - NEXTAUTH_URL=http://localhost:3000
- DIFY_API_URL=http://host.docker.internal/v1/chat-messages - DIFY_API_URL=http://df.clkeji.com/v1/chat-messages
- DIFY_API_KEY=app-lbe2lglt7taGtZk0dG7pAhbx - DIFY_API_KEY=app-lbe2lglt7taGtZk0dG7pAhbx
volumes: volumes:
- ./prisma/dev.db:/app/data/dev.db - ./prisma/dev.db:/app/data/dev.db
BIN
View File
Binary file not shown.
+29 -2
View File
@@ -115,8 +115,8 @@ async function main() {
status: "active", status: "active",
isFeatured: true, isFeatured: true,
featuredOrder: 1, featuredOrder: 1,
difyApiUrl: "https://api.dify.ai/v1", difyApiUrl: "http://host.docker.internal/v1",
difyApiKey: "app-demo-key-123456", difyApiKey: "app-lbe2lglt7taGtZk0dG7pAhbx",
}, },
}), }),
prisma.agent.upsert({ prisma.agent.upsert({
@@ -218,6 +218,33 @@ async function main() {
status: "active", status: "active",
}, },
}), }),
prisma.agent.upsert({
where: { slug: "talent-service" },
update: {},
create: {
name: "人才服务智能体",
slug: "talent-service",
description: "提供人才政策查询、招聘信息匹配、职业规划咨询、人才补贴申请等一站式人才服务。",
icon: "👥",
categoryId: categories[6].id,
features: "人才政策查询, 招聘信息匹配, 职业规划, 人才补贴申请",
hotQuestions: JSON.stringify([
"淮安市有哪些人才引进政策?",
"如何申请人才补贴?",
"高层次人才认定标准是什么?",
"人才公寓如何申请?",
]),
quickQuestions: JSON.stringify([
"人才政策查询",
"人才补贴申请",
"招聘信息",
]),
usageCount: 200,
status: "active",
isFeatured: true,
featuredOrder: 4,
},
}),
]) ])
console.log("Created agents:", agents.map(a => a.name).join(", ")) console.log("Created agents:", agents.map(a => a.name).join(", "))
-5
View File
@@ -1,5 +0,0 @@
Chat API error: TypeError: fetch failed
at async c (.next/server/app/api/chat/route.js:1:1010) {
[cause]: [Error [ConnectTimeoutError]: Connect Timeout Error (attempted address: df.clkeji.com:80, timeout: 10000ms)] {
code: 'UND_ERR_CONNECT_TIMEOUT'
} 该服务宿主机可通过localhost访问,怎么修改地址,能访问到该服务