线上版本
This commit is contained in:
parent
9440019d5a
commit
bf1b311e03
26
Dockerfile
Normal file
26
Dockerfile
Normal 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"]
|
||||
|
|
@ -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"
|
||||
>
|
||||
查看全部文章
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user