Files
ylst-h5/docker/Dockerfile
Huangzhe d49f856fd0 feat(docker): 更新 Nginx 配置并注释 Dockerfile
- 在 default.conf 中添加了访问日志和错误日志配置
- 新增了日志文件访问接口
- 注释掉了 Dockerfile 中的配置文件复制指令
2025-05-27 21:58:20 +08:00

20 lines
786 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
FROM yldc-docker.pkg.coding.yili.com/pubrepo/pubdocker/nginx:latest
# ---------------------只改此处,其它不动--------------------------
# 定义构建物目录 当前目录 ./ 为代码根目录
# ARG DIST_DIR=./dist
ARG DIST_DIR=./dist
# 定义目标相对目录访问url即为: /${URL_DIR}/index.html
ARG URL_DIR=
# ----------------------------------------------------------------
COPY ${DIST_DIR} /var/www/html/${URL_DIR}
# VUE history路由模式释放此行(无需更改内容)以更改nginx conf 的 try_files路径
RUN sed -i "s/\ \/index.html/\ \/${URL_DIR}\/index.html/g" /etc/nginx/conf.d/default.conf
# 默认不建议使用自定义nginx配置如必须使用请提前沟通
# COPY ./docker/default.conf /etc/nginx/conf.d/default.conf
EXPOSE 80