刘光辉
4 小时以前 06f314545ac3514d7ce28939920866ae8188d31c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 前端静态托管 + API/WS 反代(Backlog F)
# dist 由 make web-dist(sync-dist.sh)从前端仓库构建后快照进本目录,不入 git。
# ARG 名刻意避开 BASE_IMAGE:离线打包对全部服务统一注入 --build-arg BASE_IMAGE=<SWR JRE>,
# 撞名会把 nginx 基底覆盖成 JRE 镜像(assemble-offline-package.sh 用 NGINX_BASE_IMAGE 单独注入)。
# 默认 Docker Hub 多架构(本地 arm64 原生);alpine 无 tzdata,access log 时间为 UTC。
ARG NGINX_BASE_IMAGE=nginx:1.27-alpine
FROM ${NGINX_BASE_IMAGE}
 
# conf 同时 COPY 进镜像(自包含兜底);compose 侧挂载同一文件为准,现场免构建可改
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY dist/ /usr/share/nginx/html/
# 启动时把 .env 的 ONLYOFFICE_DS_PUBLIC_URL 写进 _app.config.js(运行时注入,产物与环境无关)
COPY --chmod=755 40-runtime-app-config.sh /docker-entrypoint.d/40-runtime-app-config.sh
 
EXPOSE 80