feat: add public assets to Docker image and update Dify API config with new talent service agent
This commit is contained in:
@@ -29,6 +29,8 @@ COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
# 复制 prisma schema (用于数据库迁移)
|
||||
COPY --from=builder /app/prisma ./prisma
|
||||
# 复制 public 静态文件
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
RUN mkdir -p /app/data && chown nextjs:nodejs /app/data
|
||||
USER nextjs
|
||||
|
||||
+2
-1
@@ -6,11 +6,12 @@ services:
|
||||
- "3000:3000"
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
- "df.clkeji.com:host-gateway"
|
||||
environment:
|
||||
- DATABASE_URL=file:/app/data/dev.db
|
||||
- NEXTAUTH_SECRET=nextapp-secret-key-2026
|
||||
- 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
|
||||
volumes:
|
||||
- ./prisma/dev.db:/app/data/dev.db
|
||||
|
||||
Binary file not shown.
+29
-2
@@ -115,8 +115,8 @@ async function main() {
|
||||
status: "active",
|
||||
isFeatured: true,
|
||||
featuredOrder: 1,
|
||||
difyApiUrl: "https://api.dify.ai/v1",
|
||||
difyApiKey: "app-demo-key-123456",
|
||||
difyApiUrl: "http://host.docker.internal/v1",
|
||||
difyApiKey: "app-lbe2lglt7taGtZk0dG7pAhbx",
|
||||
},
|
||||
}),
|
||||
prisma.agent.upsert({
|
||||
@@ -218,6 +218,33 @@ async function main() {
|
||||
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(", "))
|
||||
|
||||
|
||||
@@ -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访问,怎么修改地址,能访问到该服务
|
||||
Reference in New Issue
Block a user