fix(docker): 复制 templates 和 static 目录到运行时镜像
- 修复容器启动时找不到模板文件导致崩溃的问题 - 添加 COPY 指令复制 templates/ 和 static/ 目录 - 验证容器可正常启动并通过健康检查
This commit is contained in:
@@ -49,6 +49,10 @@ WORKDIR /app
|
||||
COPY --from=builder /app/sms-receiver .
|
||||
COPY --from=builder /app/config.example.yaml config.yaml
|
||||
|
||||
# 复制运行时需要的目录(模板和静态资源)
|
||||
COPY --from=builder /app/templates ./templates
|
||||
COPY --from=builder /app/static ./static
|
||||
|
||||
# 创建数据目录并设置权限
|
||||
RUN mkdir -p /app/data /app/logs && \
|
||||
chown -R appuser:appuser /app
|
||||
|
||||
Reference in New Issue
Block a user