Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
web
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
web
Commits
7966ed20
提交
7966ed20
authored
11月 24, 2023
作者:
ZhangLingKun
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
测试:测试推送部署
上级
c9e171c4
流水线
#7169
已失败 于阶段
in 3 秒
变更
1
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
27 行增加
和
12 行删除
+27
-12
Dockerfile
Dockerfile
+27
-12
没有找到文件。
Dockerfile
浏览文件 @
7966ed20
...
...
@@ -16,15 +16,31 @@ RUN \
else
echo
"env PROFILES_ACTIVE !=development. exec yarn run build"
&&
yarn run build
;
\
fi
# nginx
FROM
nginx:alpine as production
VOLUME
["/var/log/nginx/"]
RUN
ln
-sf
/usr/share/zoneinfo/Asia/Shanghai /etc/localtime
&&
echo
'Asia/Shanghai'
>
/etc/timezone
# If using npm comment out above and use below instead
# RUN npm run build
# Production image, copy all the files and run next
FROM
base AS runner
WORKDIR
/app
ENV
NODE_ENV production
# Set working directory to nginx asset directory
COPY
--from=builder /app/dist /usr/share/nginx/html
#COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY
nginx.conf /etc/nginx/nginx.conf
EXPOSE
80
# Containers run nginx with global directives and daemon off
ENTRYPOINT
["nginx", "-g", "daemon off;"]
\ No newline at end of file
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1
RUN
addgroup
--system
--gid
1001 nodejs
RUN
adduser
--system
--uid
1001 nextjs
COPY
--from=builder /app/public ./public
# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY
--from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY
--from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
USER
nextjs
EXPOSE
3000
ENV
PORT 3000
CMD
["node", "server.js"]
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论