线上版本

This commit is contained in:
WindowBird 2025-11-18 10:04:12 +08:00
parent 9440019d5a
commit bf1b311e03
4 changed files with 28 additions and 2 deletions

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM node:22.17.1-alpine
LABEL maintainer="windowbird"
ENV NODE_ENV=production \
NUXT_HOST=0.0.0.0 \
PORT=3012
#5、容器内创建目录/nuxt4
RUN mkdir -p /nuxt4
#6、复制当前的内容到容器内容部目录/nuxt4
COPY . ./nuxt4
#7、切换工作目录到/nuxt4
WORKDIR /nuxt4
# 健康检查
HEALTHCHECK --interval=30s --timeout=3s \
CMD curl -f http://localhost:3012/_nuxt/health || exit 1
# 暴露端口
EXPOSE 3012
# 启动命令(显式指定端口)
CMD ["node", "./server/index.mjs", "--port", "3012", "--host", "0.0.0.0"]

View File

@ -37,7 +37,7 @@ const formatTime = (timeString: string): string => {
//
const getArticleLink = (articleId: string): string => {
return `/article/${articleId}`
return `/article-xlqx/${articleId}`
}
// 2
@ -181,7 +181,7 @@ onMounted(() => {
<!-- 查看全部链接 -->
<div v-if="!loading && !error && newsData.length > 0" class="text-center mt-0 mb-4">
<a
href="/article"
href="/app/pages/article-xlqx"
class="inline-block px-6 py-3 bg-primary-600 hover:bg-primary-700 text-white text-base font-medium rounded-lg transition-all duration-150 ease-in-out no-underline hover:shadow-lg"
>
查看全部文章